A sophisticated Flutter implementation of the classic Tic Tac Toe game with modern UI, AI opponents, multiple board sizes, timer challenges, and advanced features.
- Player vs Player: Traditional two-player gameplay with custom names
- Player vs AI (Easy): Beginner AI with random moves
- Player vs AI (Hard): Expert AI with strategic gameplay using minimax-inspired algorithm
- 3x3 Classic: Traditional Tic Tac Toe experience
- 4x4 Medium: Increased challenge and strategy
- 5x5 Expert: Advanced gameplay for serious players
- Dynamic board rendering that adapts to size
- Smart win detection for all board sizes
- Optional Timer: Enable/disable per game
- Adjustable Duration: 10-60 seconds per move
- Visual Countdown: Real-time timer display
- Color Warning: Red alert when time is low (<10 seconds)
- Timeout Handling: Automatic win for opponent on timeout
- Auto-Reset: Timer resets after each move
- Custom Names: Personalize player identities
- Profile Setup: Pre-game configuration screen
- Player Display: Names shown throughout gameplay
- AI Naming: Clear AI opponent identification
- Easy AI: Makes random moves for casual play
- Hard AI: Advanced strategy including:
- Prioritizes winning moves
- Blocks opponent's winning moves
- Prefers center and corner positions
- Strategic placement for optimal gameplay
- Adapts to all board sizes
- Persistent Storage: Stats saved across sessions
- Real-time Score Tracking: Wins, losses, and draws
- Detailed Statistics Dialog: Complete game history
- Quick Stats Display: Live score summary at bottom
- Total Games Counter: Lifetime game tracking
- Reset Statistics: Clear all data option
- Matcha Sage Green Theme: Calming, natural aesthetic with dark fonts
- Creamy Backgrounds: Soft ivory and sage tones
- Material Design 3: Modern Flutter design principles
- Smooth Animations: Elastic scaling effects for winning cells
- Responsive Layout: Adapts to all screen sizes
- Dark Readable Fonts: Excellent contrast and readability
- Undo Functionality: Take back moves during gameplay
- Game History: Complete move tracking
- Replay Capability: Review game moves
- Haptic Feedback: Tactile response on moves
- Smart Game Status: Context-aware status messages with player names
- Winning Detection: Enhanced with line highlighting
- Dynamic Cell Sizing: Adapts to board size (80px for 3x3, 65px for 4x4, 50px for 5x5)
- Game Mode Selection: Beautiful menu with mode cards
- Player Setup Screen: Configure game before starting
- Board Size Selector: Segmented button for easy selection
- Timer Controls: Slider for precise time adjustment
- Intuitive Navigation: Smooth transitions between screens
- Statistics Access: Quick stats button in app bar
- Settings Toggle: Enable/disable timer easily
- Choose Game Mode: Select Player vs Player or AI difficulty
- Enter Player Names: Customize player identities (optional)
- Select Board Size: Choose 3x3, 4x4, or 5x5
- Enable Timer (Optional): Set time limit per move (10-60 seconds)
- Start Game: Begin playing!
- Make Moves: Tap empty cells to place your mark
- Watch Timer: Keep an eye on the countdown if enabled
- View Status: Game status shows current player's turn
- Check Stats: View live win/loss counts at bottom
- Get all marks in a row (horizontally, vertically, or diagonally)
- Win by timeout if opponent runs out of time
- Winning line highlights in peachy cream color
- Statistics automatically update and save
- Undo: Tap the Undo button to take back moves
- New Game: Start fresh anytime
- Statistics: View detailed game history via analytics icon
- Back Navigation: Return to setup or mode selection
The app uses a matcha sage green color scheme. To customize:
Seed Color: Modify in TicTacToeApp:
seedColor: const Color(0xFFA8C69F) // Matcha sage greenBackground Gradients:
colors: [const Color(0xFFEFF5EC), const Color(0xFFD8E5D3)]Card Backgrounds:
color: const Color(0xFFFFFFF0) // Ivory creamText Colors:
color: const Color(0xFF2C3E2A) // Dark green (main)
color: const Color(0xFF3A5037) // Dark olive (secondary)- Sound Effects: Audioplayers package already integrated
- More Board Sizes: Extend
BoardSizeenum - Custom Themes: Implement theme selector
- Online Multiplayer: Add networking layer
- Achievements: Expand existing achievement system
| Mode Selection | Player Setup | Game Board (3x3) |
|---|---|---|
![]() |
![]() |
![]() |
| Game Board (4x4) | Game Board (5x5) | Timer Warning |
|---|---|---|
![]() |
![]() |
![]() |
| Statistics | Winning Animation | AI Gameplay |
|---|---|---|
![]() |
![]() |
![]() |
If you have any questions or run into issues:
- Check the Issues page
- Create a new issue with detailed information
- Contact the maintainers
Made with โค๏ธ and โ using Flutter
โญ Star this repository if you found it helpful!
๐ต Enjoy your matcha-themed Tic Tac Toe experience!








