This project is a Java-based Tic-Tac-Toe game that allows players to:
- Choose any grid size (not limited to 3×3)
- Play against another human player or an AI opponent
The game runs in the console and focuses on game logic, AI decision-making, and flexible board design.
- 🔢 Custom Grid Size
- Players can choose the board size (e.g., 3×3, 4×4, 5×5, etc.)
- 👥 Two Game Modes
- Player vs Player
- Player vs AI
- 🤖 AI Opponent
- Automatically selects valid moves
- Competes against the human player
- ✅ Win & Draw Detection
- Correctly identifies wins across rows, columns, and diagonals
- Detects draw conditions when the board is full
The game is structured using object-oriented programming principles, with clear separation of responsibilities such as:
- Board creation and display
- Player input handling
- Game state evaluation
- AI move generation
This modular design makes it easy to adjust the grid size and extend game logic.