A feature-rich chess application built with Flutter and Flame engine, offering both single-player AI modes with varying difficulty levels and offline two-player gameplay. The app features beautiful customizable themes, multiple piece styles, and a powerful chess AI powered by the minimax algorithm with alpha-beta pruning.
- Single Player: Play against an intelligent AI opponent with 6 difficulty levels
- Two Player Mode: Offline multiplayer on the same device
- Side Selection: Choose to play as white, black, or random
- Timed Games: Optional time controls for competitive play
- 7 Beautiful Themes: Including Grey, Dark, Amoled, Lewis, Cherry Funk, Sage, Warm Tan, and Jargon Jade
- 7 Piece Themes: Classic, Angular, 8-Bit, Letters, Video Chess, Lewis Chessmen, and Mexico City
- Dark Mode Support: Multiple dark theme options including pure AMOLED black
- Custom Font: Jura font for elegant typography
- Move History: Track all moves throughout the game using Standard Algebraic Notation (SAN)
- Undo/Redo: Take back moves or replay them (configurable)
- Move Hints: Visual indicators for valid moves
- Board Notation: Algebraic notation (a-h, 1-8) coordinates on the board borders
- Sound Effects: Audio feedback for piece movements
- Board Rotation: Automatic board rotation based on turn
- Promotion Handling: Full support for pawn promotion
- Check Detection: Visual indicators for check and checkmate
- Stalemate Detection: Proper game-end condition handling
- 6 Difficulty Levels: From beginner to expert (depth 1-6)
- Minimax Algorithm: With alpha-beta pruning optimization
- Strategic Evaluation: Intelligent position analysis
- Responsive Thinking: Adjustable AI processing time based on difficulty
Add your app screenshots here
- Flutter - UI framework
- Flame - 2D game engine for chess board rendering
- Provider - State management
- Shared Preferences - Local data persistence
- Flame Audio - Sound effects
- URL Launcher - External links
- Flutter SDK (3.0.0 or higher)
- Dart SDK (3.0.0 or higher)
- Android Studio / Xcode (for mobile development)
- A device or emulator
-
Clone the repository
git clone https://github.com/shenmareparas/Chess.git cd Chess -
Install dependencies
flutter pub get
-
Run the app
flutter run
-
Build for production (optional)
# Android flutter build apk --release # iOS flutter build ios --release
lib/
├── main.dart # App entry point
├── model/
│ ├── app_model.dart # Main app state management
│ └── app_themes.dart # Theme definitions
├── logic/
│ ├── chess_board.dart # Board logic
│ ├── chess_game.dart # Game controller
│ ├── chess_piece.dart # Piece models
│ ├── chess_piece_sprite.dart # Piece rendering
│ ├── shared_functions.dart # Utility functions
│ └── move_calculation/ # Move validation and AI logic
└── views/
├── main_menu_view.dart # Main menu screen
├── chess_view.dart # Game screen
├── settings_view.dart # Settings screen
└── components/ # Reusable UI components
The chess AI uses the Minimax algorithm with alpha-beta pruning to determine optimal moves:
- Minimax Algorithm: Evaluates the game tree by simulating moves and counter-moves
- Alpha-Beta Pruning: Optimizes search by eliminating branches that won't affect the final decision
- Depth-Based Difficulty:
- Level 1: Depth 1 (1 half-move lookahead)
- Level 2: Depth 2 (1 full move)
- Level 3: Depth 3 (1.5 full moves)
- Level 4: Depth 4 (2 full moves)
- Level 5: Depth 5 (2.5 full moves)
- Level 6: Depth 6 (3 full moves)
The AI evaluates positions based on:
- Material advantage (piece values)
- Piece positioning and mobility
- King safety
- Pawn structure
- Control of center squares
Learn more: Alpha-Beta Pruning on Wikipedia
The app stores user preferences locally using SharedPreferences:
- Selected theme
- Piece theme preference
- Move history visibility
- Sound settings
- Hint display settings
- Board Rotation preference
- Undo/Redo availability
- Start a New Game: From the main menu, configure your game settings
- Select Mode: Choose between 1-player (vs AI) or 2-player mode
- Choose Difficulty: For AI games, select from 6 difficulty levels
- Customize: Pick your preferred theme and piece style
- Play: Tap pieces to select them, then tap valid squares to move
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Paras Shenmare
- GitHub: @shenmareparas
- Google Play: Download Chess
- Chess piece graphics from various open-source sets
- Jura font by Daniel Johnson
- Flutter and Flame communities
If you encounter any issues or have suggestions, please open an issue.
⭐ If you like this project, please give it a star on GitHub!

