I work late night so create my own game
On call keeps me awake at night so I decided to make a python tic-tac-toe game
python play-tic-tac-toe.py
1 | 2 | 3 |
|
---+--+-- ---+--+--
4 | 5 | 6 |
|
---+--+-- ---+--+--
7 | 8 | 9 |
|
Choose a position:
1 | 2 | 3 |
|
---+--+-- ---+--+--
4 | 5 | 6 | X | O
---+--+-- ---+--+--
7 | 8 | 9 |
|
Choose a position:
6 is already in use
You win!
1 | 2 | 3 O |
| X
---+--+-- ---+--+--
4 | 5 | 6 | X | O
---+--+-- ---+--+--
7 | 8 | 9 X | O | X
Would you like to play again? (y/n)