A modern, fully responsive Tic Tac Toe game built with React featuring an unbeatable AI powered by the Minimax algorithm.
- Play as X or O
- Choose whether you go first or let the computer start
- Unbeatable AI (Minimax algorithm)
- Real-time score tracking (Player • Ties • Computer)
- Clean and modern UI with smooth hover effects
- Fully responsive design (works perfectly on mobile and desktop)
- Scoreboard positioned on the right side
- Play again functionality
- Choose your symbol (X or O)
- Decide if you want to go first
- Click on any empty cell to make your move
- Try to get three in a row horizontally, vertically, or diagonally
- The computer will play optimally using the Minimax algorithm
- You: Your wins as the selected symbol
- Ties: Number of drawn games
- Computer: Computer's wins
Scores are saved during your current session.
- React (Hooks:
useState,useEffect) - JavaScript (ES6+)
- CSS3 (Flexbox, Grid, Modern styling)
- Minimax Algorithm for AI
The game automatically adapts to different screen sizes:
- On desktop: Scoreboard appears on the right side
- On mobile: Scoreboard moves below the board for better usability
Enjoy the game and try to beat the AI! 💪
# Clone the repository
git clone <your-repo-url>
# Navigate to project folder
cd tic-tac-toe
# Install dependencies
npm install
# Start the development server
npm start