Tic Tac Toe Program
Each player takes a move that leads to a winning position
with the fewest steps.
This number is returned by play().
-
The number of steps to a winning positon is used as it is.
-
The number n of steps to a losing positon is
assigned to nSteps as 100 - n.
-
The number 50 or 49 is used as the number of steps to a draw postition.
Source Code of the TicTacToe Program
Source Code of the TicTacToe Program
(Graphical Version)
Back
Home