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.
- Host: GitHub
- URL: https://github.com/poundifdef/tic-tac-toe
- Owner: poundifdef
- Created: 2011-08-20T17:46:32.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-08-25T16:24:57.000Z (over 14 years ago)
- Last Synced: 2025-04-04T14:51:16.437Z (10 months ago)
- Language: Java
- Homepage: http://a9e184f7.dotcloud.com/tictactoe/
- Size: 141 KB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README
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!