An open API service indexing awesome lists of open source software.

https://github.com/poundifdef/tic-tac-toe

Program which plays an optimal game of tic tac toe.
https://github.com/poundifdef/tic-tac-toe

Last synced: 7 months ago
JSON representation

Program which plays an optimal game of tic tac toe.

Awesome Lists containing this project

README

          

Tic Tac Toe game. You should never win :)

In fact, this game should always tie unless you make a mistake. If you find
a scenario where the computer could have made a better move, let me know!

Everything you need is in TicTacToe.java; no need to scour 10 directories
of beautifully abstracted code to wrap your head around a tic tac toe game!
Look at its main() method to see the mechanics of game play.

tictactoe_tomcat/ is a small web wrapper around the TicTacToe engine.
You can play against it here: http://a9e184f7.dotcloud.com/tictactoe/

The solution here is a little more brute-forcy (and maybe a little less mathy)
than I'd like; if you have suggestions, I'd love to see a patch!