Skip to content

demirburakk/bbackgammon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBackgammon

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.

Features

  • 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.

Project Structure

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.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/demirburakk/bbackgammon.git
    cd bbackgammon
  2. Get dependencies for both packages:

    # In the root directory
    cd backgammon_shared
    flutter pub get
    
    cd ../backgammon_client
    flutter pub get
  3. Run the application:

    flutter run

Development

The code is fully documented in English to explain the architecture and game logic.

  • Game Logic: Found in backgammon_shared/lib/src/logic/ and usecases/.
  • 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/.

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.