This is a simple command-line implementation of the classic Tic Tac Toe game in Python.
-
Ensure you have Python installed on your machine. You can download it from Python.
-
Clone the repository to your local machine:
git clone https://github.com/GOR-OM/Tick-Tack-Toe.git
-
Navigate to the project directory:
-
Run the game:
python tic_tac_toe.py
- The game starts with an empty 3x3 board.
- Players take turns entering a value (0-8) to place their symbol ('X' or 'O' on the board.
- The game continues until one player wins or the board is full, resulting in a draw.
- Player 'X' is prompted to enter a value during their turn.
- Player 'O' is prompted to enter a value during their turn.
Welcome to Tic Tack Toe
0 | 1 | 2
--|---|--
3 | 4 | 5
--|---|--
6 | 7 | 8
X chance
Please enter a value (0-8): 0
X | 1 | 2
--|---|--
3 | 4 | 5
--|---|--
6 | 7 | 8
O chance
Please enter a value (0-8): 1
X | O | 2
--|---|--
3 | 4 | 5
--|---|--
6 | 7 | 8
X chance
Please enter a value (0-8): 2
X | O | X
--|---|--
3 | 4 | 5
--|---|--
6 | 7 | 8
O chance
Please enter a value (0-8): 3
X | O | X
--|---|--
O | 4 | 5
--|---|--
6 | 7 | 8
X chance
Please enter a value (0-8): 4
X | O | X
--|---|--
O | X | 5
--|---|--
6 | 7 | 8
O chance
Please enter a value (0-8): 5
X | O | X
--|---|--
O | X | O
--|---|--
6 | 7 | 8
X chance
Please enter a value (0-8): 6
X won the match
---------------------------------------------
X | O | X
--|---|--
O | X | O
--|---|--
X | 7 | 8