MinMax TicTacToe

To see how the script is used, just check out the source of this page. Most browsers have a "view source" menu-item. Also don't forget to see the MinMax source, and the TicTacToe state souce. The methods on TicTacToe state which are used by the MinMax can be used with any game as long as they return proper values.

This is just a simple example of using this script. When a game ends, just click the board to clear it. "CPU goes first" does not take effect until a new game is started.