A simple Tic-Tac-Toe game implemented in Python using Pygame. The game allows two players to play against each other or one player to compete against an AI powered by the minimax algorithm. The game features a 3x3 grid, win-checking logic, and restart functionality via the "R" key. The AI makes optimal moves, providing a challenging opponent.
- Two-player gameplay or player vs AI
- Minimax algorithm for AI decision-making
- Win-checking and draw detection
- Restart game with the "R" key
- Clone the repository:
[git clone /~https://github.com/SamuelMarete/TicTacToe-With-Minimax-AI.git]
- Install the required dependencies:
pip install pygame numpy
- Click on any empty square to make a move.
- The AI will automatically make its move after you.
- Press the "R" key to restart the game.
This project is licensed under the MIT License.