Tic Tac Toe against AI
- Single-player game
- AI can block the user's move and search for winning combinations
- Detects draws, winners, and offers the option to restart the game
- Play by entering a number from 1 to 9
The AI uses a simple strategy:
- If it can win, it plays the winning move
- If the user can win, it blocks the user's winning move
- If possible, it starts by taking the center of the board
- If the center is taken, it tries to take a corner
- Otherwise, it chooses a random available field
- Make sure Python 3 is installed
- Download this repository
- In terminal, type: git clone https://github.com/Jakub-coding99/tic-tac-toe
- Run tic_tac_toe_ai_oop.py


