SFML community forums

General => SFML projects => Topic started by: Mortal on July 21, 2015, 01:18:17 am

Title: Tic Tac Toe
Post by: Mortal on July 21, 2015, 01:18:17 am
i have made Tic Tac Toe game by using SFML. It seems to work fine. I'm actually new to SFML and making GUIs. If anyone is familiar with SFML, I'd appreciate some pointers on how to improve it.

code here at (https://gist.github.com/MORTAL2000/c5beb7b5f65a25400434)
Title: Re: Tic Tac Toe
Post by: Hapax on July 21, 2015, 03:08:15 am
Isn't Tic-tac-toe 3x3?  ;D

Improvement suggestions:
Title: Re: Tic Tac Toe
Post by: Mortal on July 21, 2015, 07:47:45 am
thanks really appreciated. i have done those change except making it harder, i want to solve some known bugs first. also added title and made the board at center of screen.

Title: Re: Tic Tac Toe
Post by: Mortal on July 23, 2015, 11:02:30 pm
for sake of improve this game. i made a few changes to it. it not that much but it makes the game a little bit nicer

code here at gist (https://gist.github.com/MORTAL2000/c5beb7b5f65a25400434)

Title: Re: Tic Tac Toe
Post by: Mario on July 24, 2015, 08:11:21 pm
If you want to share code, you should use a public repository (like https://github.com/) or at least a service allowing people to upload/download raw files (like https://gist.github.com/). That way it's a lot easier for people to actually try your code without copying forum code, breaking formatting in the process, etc.
Title: Re: Tic Tac Toe
Post by: Mortal on July 24, 2015, 09:04:57 pm
thanks Mario
i edited my post. it much better now
Title: Re: Tic Tac Toe
Post by: Mortal on July 25, 2015, 03:41:44 am
at last i fixed all known bugs. i updated the code at gist. i hope this code will work fine by now
Title: Re: Tic Tac Toe
Post by: Mortal on July 28, 2015, 05:33:41 am
i added shader lights to it

source code: https://gist.github.com/MORTAL2000/2ba8479330e554b4f08e
Title: Re: Tic Tac Toe
Post by: Mortal on December 27, 2017, 12:55:48 pm
i'm back to my first GUI game that i made few years ago. i implement minimax algorithm to improve AI now the game become unbeatable  :P

source code: https://gist.github.com/MORTAL2000/c8014042a65985a568b5dd7c2f635cab (https://gist.github.com/MORTAL2000/c8014042a65985a568b5dd7c2f635cab)

(https://i.imgur.com/agYejdQ.png)