Add entrapment in a game were a player loses because they can’t move as well as being able to perform more than one jump in a move.

Goal

  • Implement new gameplay logic and settings:
    • Entrapment Mode (V2.5.0)
    • Double-jump / multi-jump support (V2.6.0)
  • Wire the new rules/settings into Admin UI and persistence.

Comments

It was found tha the app did not know when a game had actually ended so that was implemented as per a previous commit. It is also in the rules that if it is a player’s turn and they can’t move then they lose. For simplicity it was decided to initially only implement single jumps in a move. The app logic was added here to allow a player to make a second move as a jump after they have made a jump, but the other player can butt in after 2 seconds in which case they lose that chance.


Summary of Work Completed

V2.5.0 — Entrapment Mode implemented

  • Added support for an “Entrapment Mode” rule variant.
  • Added/updated settings and persistence so the mode can be configured and survives restarts.

V2.6.0 — Double jumps implemented

  • Implemented double-jump / multi-jump gameplay support.
  • Added/updated settings and persistence related to multi-jump behavior.
  • Updated the UI/game component to support the new move flow.

Files Changed (from git commits)

Commit a7e5774 — V2.5.0; Entrapment Mode implemented

  • Components/Pages/Admin.razor
  • Data/AppSettings.cs
  • Data/DbSeeder.cs
  • Drafts.csproj
  • Services/DraftsService.cs
  • Services/SettingsService.cs

Commit 064e9e4 — V2.6.0 Double jumps implemented

  • Components/DraftsGame.razor
  • Components/Pages/Admin.razor
  • Data/AppSettings.cs
  • Data/DbSeeder.cs
  • Drafts.csproj
  • Services/DraftsService.cs
  • Services/SettingsService.cs

Implementation Areas (high-level)

Game logic

  • Core rule implementation lives in:
    • Services/DraftsService.cs

UI/game component

  • Gameplay interaction changes primarily in:
    • Components/DraftsGame.razor

Settings and persistence

  • App settings model:
    • Data/AppSettings.cs
  • Settings load/update/persist:
    • Services/SettingsService.cs
  • DB schema / seed / migrations-like setup:
    • Data/DbSeeder.cs

Admin UI

  • Exposed settings and admin controls:
    • Components/Pages/Admin.razor

Verification / Testing

  • Manual testing focus areas for these changes:
    • Entrapment Mode behavior toggling and enforcement
    • Multi-jump correctness (allowed sequences, turn completion, capture handling)
    • Admin settings persistence across restarts

##Comments


 TopicSubtopic
   
 This Category Links 
Category:Artificial Intelligence Index:Artificial Intelligence
  Next: > Checkers-Drafts Game
<  Prev:   Checkers-Drafts Game