This is a graphical Tic-Tac-Toe game implemented in Python using the tkinter
library. It offers an interactive way to play the game, either against an AI.
- Interactive GUI: A user-friendly graphical interface for playing Tic-Tac-Toe.
- AI Opponent: Play against a simple AI with basic logic for making moves.
- Two-Player Mode: Option to play with a friend on the same device.
- Win, Loss, and Tie Detection: Automatically checks for game outcomes after each move.
- Score Tracking: Keeps track of scores for both players (Player X and Player O).
- Reset Options: Buttons to reset the game board or reset the scores.
- Responsive Design: The game window is centered and visually appealing.
- Ensure you have Python installed on your system.
- Run the following command in your terminal:
python3 tictactoe.py
- A graphical window will open where you can select the game mode and play the game.
- At the start, choose whether to play against an AI or a second player.
- The game starts with Player X.
- Click on an empty cell to make your move.
- The game alternates between Player X and Player O.
- The first player to align three of their marks in a row, column, or diagonal wins.
- If all cells are filled without a winner, the game ends in a tie.
- Reset Game: Click the "Reset Game" button to clear the board and start a new game.
- Reset Scores: Click the "Reset Scores" button to reset the scores for both players.
- Python 3.x
tkinter
(comes pre-installed with Python on most systems)