This is a simple Tic Tac Toe game implemented in Python using the Pygame library. The game allows two players to take turns marking spaces in a 3x3 grid until one player wins or the board is full (resulting in a draw).
- Player vs Player mode: Two players can play on the same computer, taking turns to make their moves.
- Player vs AI mode: Play against a simple AI that uses the minimax algorithm to make strategic moves.
- Visual indicators for winning lines and draws.
- Option to reset the game and switch game modes (Player vs Player or Player vs AI).
- Clone the repository to your local machine:
git clone https://github.com/your-username/Tic-Tac-Toe.git
- Navigate to the project directory:
cd Tic-Tac-Toe
- Install the required dependencies (Pygame):
pip install pygame
- Run the game using Python:
python main.py
- Choose a game mode (Player vs Player or Player vs AI) by pressing the 'g' key.
- You can reset the game using the 'r' key.
- Make moves by clicking on the desired grid squares during your turn.
- Enjoy the game and have fun!
- This game was created by Ubaid Abbas.
- Inspired by tutorials and resources from the Pygame community.
This project is licensed under the MIT License.