Monday, May 14, 2012

Design and Code : TicTacToe Game

Problem :

Design and code the TicTacToe game. Take care of all corner cases. The program should be extensible and very modular.

Solution :

This is a trivial game. We just need to take care of the vertical, horizontal and diagonal strikes, after each move. If there is any, then the game ends. After all moves, if there are no strikes, then the game is drawn.

The complete source code is available here

No comments:

Post a Comment