A modern implementation of the classic Tic Tac Toe game built with React and TypeScript. Play against an AI opponent with three different difficulty levels!
- 🎮 Play against AI with three difficulty levels:
- Easy: Makes random moves
- Medium: Tries to block your wins and make winning moves
- Hard: Uses the minimax algorithm for perfect play
- ✨ Celebratory confetti animation when winning
- 🔄 Game history navigation
- 🎯 Highlighting of winning moves
- 📱 Responsive design
- 🎨 Modern UI with smooth animations
- React
- TypeScript
- CSS3
- react-confetti
- Clone the repository
git clone [your-repo-url]
cd tictactoe- Install dependencies
npm install- Run the development server
npm start- Open http://localhost:3000 to play the game
- Select your preferred AI difficulty level
- Click on any square to make your move (you play as X)
- The AI will automatically make its move (O)
- Try to get three in a row horizontally, vertically, or diagonally
- Use the history buttons to undo moves or restart the game
src/components/- React componentssrc/utils/- Game logic and AI implementationsrc/App.tsx- Main game componentsrc/App.css- Styles
Feel free to submit issues and enhancement requests!