OXO Source



Arduino / AVR code playing Tic-Tac-Toe like in the WarGames movie.
The code plays a perfect Tic-Tac-Toe game using a simple minimax algorithm.


Upload the code to an Arduino board and open a serial connection to the board (with the Serial Monitor in the Arduino IDE or with the 'screen' command in an unix shell)
Use the numeric keypad to play.

|7|8|9|
|4|5|6|
|1|2|3|

Download OXO.pde


------------------
TIC-TAC-TOE
STAGNARO GUILLAUME
(CC) 2008
------------------

ONE OR TWO PLAYERS?
PLEASE LIST NUMBERS OF PLAYERS:
1
-----------------
PLAYER O WINS: 0
PLAYER X WINS: 0
DRAWS: 0
-----------------
STARTING NEW GAME
-----------------


|.|.|.|
|.|.|.|
|.|.|.|

PLAYER X MOVE?