Tic Tac Toe Game writen in Python.
Let's talk a little bit about the rules of Tic-Tac-Toe:
In Tic-Tac-Toe, two players try to fill a row, a column, the diagonal, or the antidiagonal of a 3x3 game board.
This will be our game board:
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
The user will enter an integer from 1 to 9 (inclusive) to select the position on the board.
On each turn, each player will select a particular position on the board and his/her marker will be added to that position.
We will have a human player playing against the computer player, which will select a random position.
If the player selects a position that is already taken, he/she loses the turn.
When a row, a column, the diagonal, or the antidiagonal is full with the player's markers, the game is over and that players wins the game.
If the board is full but none of the players has won the game, then there is a tie.
When the game is over, we will ask the user if he/she would like to continue playing. We will take user input and start a new round if the player chooses to continue the game.