Simple tic-tac-toe

posted by: Ms. Martin 21 January 2011 No Comment

Implement a console-based Tic-Tac-Toe game played on the console.

Define 4 constants — one for the board size, one for an empty cell, one representing a user play and one representing a computer play.

You should define methods to do at least the following (probably more!):

  • Clear board
  • Get the user to play
  • Get the computer to play
  • Check to see if the game is over
  • Display the board
  • Find out who won
1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 3.00 out of 5)
Loading ... Loading ...

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>