Line: | Input Line | Type: | Exercise |
You should have completed: | This topic leads to: |
This is the end of the line. |
The game of noughts and crosses, or tic-tac-toe is a common childhood game. In this exercise, you will design a two player computer version of this game.
Each player is asked in turn where they want to place their next piece, they can identify one of the nine possible locations on the game board as shown below.
After they have entered their move the game will print out the current state of the board and ask the next player for their go.
If either player enters 0 for their move, they concede the game. The game should then congratulate the winner and end.
It is suggested that you write some methods for this program. For example, you may have a method to: