Tic Tac Toe with AI
A simple implementation of the classic Tic Tac Toe game in Python, featuring an AI opponent. The game uses the Tkinter library for the graphical user interface (GUI).
Features
- Play against the computer: The AI acts as the second player and makes optimal moves to win the game.
- User-friendly GUI: The game interface is built using Tkinter, providing a smooth and intuitive experience.
- Restart functionality: During or after the game, players can easily restart a new round.
How to Play
-
Clone the repository or download the source code.
-
Make sure you have Python 3.x installed on your system.
-
Run the game using the following command:
python3 tic_tac_toe.py
-
The game board will appear with an empty 3x3 grid.
-
Click on the cells to place your moves. The AI will respond automatically.
-
The game will continue until a player wins or the board is full (a draw).
-
After the game concludes, click the "Restart" button to start a new round.
Dependencies
- Python 3.x
- Tkinter library (usually included with Python installations)