Home Contact Me Tutorials

Tic Tac Toe Game That Never Loses


I wrote this Noughts and Crosses game during my 2004 Easter break. A human player who plays against the computer should never win. At best, the human player can only force the computer to a draw.

The program was written in C++ and should work on most Windows operating systems. It should also work fine on Linux machines using WINE. If you actually manage to win the computer, that means there is a bug and I would appreciate it if you emailed me.

29th August 2005: Source code now available. Note that I wrote this more than a year ago, and I have not checked for bugs since. A Dev-C++ project file is included.



Executable (6.5kb)
Zipped Source Code (15.2kb)