A beautiful, functional Backgammon game built with Flutter and Riverpod. This project is designed as a local-only application, featuring solo play against an AI and local "pass-and-play" multiplayer.
- Solo vs AI: Challenge a heuristic-based AI opponent.
- Pass & Play: Play against a friend on the same device.
- Dynamic Themes: Customize the board and pieces with a built-in theme store.
- Smooth Animations: Enjoy interactive 2D pieces and dice animations.
- Internationalization: Support for multiple languages (English and Turkish).
- Haptic Feedback: Physical feedback for game actions and errors.
The project is organized as a workspace with two main packages:
backgammon_client: The Flutter application containing the UI, state management (Riverpod), and platform-specific code.backgammon_shared: A pure Dart package containing the core game logic, entities, and AI heuristic evaluator.
- Flutter SDK (latest stable version recommended)
- Dart SDK
-
Clone the repository:
git clone https://github.com/demirburakk/bbackgammon.git cd bbackgammon -
Get dependencies for both packages:
# In the root directory cd backgammon_shared flutter pub get cd ../backgammon_client flutter pub get
-
Run the application:
flutter run
The code is fully documented in English to explain the architecture and game logic.
- Game Logic: Found in
backgammon_shared/lib/src/logic/andusecases/. - AI Evaluator: The AI's decision-making logic is in
backgammon_shared/lib/src/logic/heuristic_evaluator.dart. - UI Components: Modular Flutter widgets are located in
backgammon_client/lib/features/game/presentation/widgets/.
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.