Last active
December 13, 2015 18:59
-
-
Save lessandro/4959740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write me a tic tac toe game. | |
The grid coordinates should be: | |
1 2 3 | |
4 5 6 | |
7 8 9 | |
The program should run like this: | |
Player X turn: 5 (<<< USER INPUT HERE) | |
. . . | |
. X . | |
. . . | |
Player O turn: 4 | |
. . . | |
O X . | |
. . . | |
Player X turn: 1 | |
X . . | |
O X . | |
. . . | |
Player O turn: 4 | |
Invalid position! | |
Player O turn: 6 | |
X . . | |
O X O | |
. . . | |
Player X turn: 9 | |
X . . | |
O X O | |
. . X | |
X won! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment