This project is a simple implementation of the TicTacToe game in Python.
Before playing, ensure that you have Python installed on your system. You can download and install Python from the official website: https://www.python.org/downloads/.
Once Python is installed, you need to install the necessary dependencies. All required libraries are listed in the requirements.txt
file.
To install the dependencies, run the following command in your terminal:
pip install -r requirements.txt
Once the dependencies are installed, you can start the game by running:
python3 tictactoe.py
You have the option to play in one of the following modes:
Play against the computer with three difficulty levels:
- Easy: The computer makes random moves.
- Medium: The computer plays moderately well, with some strategic moves.
- Impossible: The computer is unbeatable and will always play optimally.
Play against a friend by taking turns on the same device.
The game is played on a 3x3 grid. Two players take turns, one using X and the other using O. Each player selects an empty square on the grid during their turn. The first player to align three of their symbols (horizontally, vertically, or diagonally) wins the game. If all squares are filled and no player has aligned three symbols, the game ends in a draw. Enjoy the game!