This is a command-line Tic Tac Toe game built using Python. It supports a two-player mode and also includes an AI opponent with three difficulty levels: Easy, Medium, and Hard.
- Run the script in a terminal.
- Choose game mode:
- 2-player mode
- Play against AI (coming soon: Easy, Medium, Hard levels)
- Players take turns selecting a position (1-9) on the board.
- The first player to get three in a row wins!
- If all spaces are filled and no one wins, the game ends in a draw.
✅ Command-line interface for a classic feel. ✅ 2-player mode. ✅ AI opponent with selectable difficulty (tic_tac_toe_v0.2.py). ✅ Input validation to prevent invalid moves. ✅ Automatic win/draw detection.
- Python 3.x installed
- Clone the repository:
git clone https://github.com/Garschke/tic-tac-toe.git
- Navigate to the project folder:
cd tic-tac-toe
- Run the game:
python3 tic_tac_toe_v0.2.py
Screenshot showing program in action.
Starting screen with player modes.
Game Over screen - result draw or winner.
✅ Implement AI difficulty levels: Easy, Medium, Hard.
- Enhance board visuals.
- Add a GUI version using Tkinter or Pygame.
Feel free to fork the repo and submit pull requests!
- Create your feature branch: git checkout -b feature/NewFeature
- Commit your changes: git commit -m 'Add new feature'
- Push to the branch: git push origin feature/NewFeature
- Open a pull request.
This project is open-source and available under the MIT License.
Happy coding! 🎉