This is a simple text console-based implementation of the Tic-Tac-Toe game.
This game requires Python3, and we don't need any other dependencies besides the Python Standard Library.
We simply start the game with:
$ python3 main.py
Each player will be asked to enter the position they would like to put their symbol (either an 'x' or an 'o') on.
Player X will go first and then followed by Player Y.
The first row is numbered with indices 0, 1, and 2. The second row uses indices 3, 4, and 5. The last row uses indices 6, 7, and 8.
Here's an example of how the board looks like:
Player x, position of x: 6
| o | x
----------
o | x |
----------
x | |
Yeah! x got three in a row!
Thanks for playing!
------------------
Would you like to play again? (Y/N)
Yeah, it's easy as that! Have fun playing Tic-Tac-Toe! 😎 ❌⭕❌⭕