Prefactor: move craps into a game module and a UI module #29

Closed
opened 2026-08-12 17:43:31 +00:00 by rosa · 0 comments
Owner

Parent

#27

What to build

Craps plays exactly as it does today, with nothing a player could notice, but
the module is laid out the way roulette is: a game half holding the bets, the
positions and the dice, a UI half holding the prompts and the animation, and the
module's own file declaring the two and re-exporting what the rest of the casino
needs.

Purely mechanical. No rules change, no interface change, no new tests. This
exists so that the round engine that follows arrives as a diff about how craps
settles rather than a diff about which file things live in.

Acceptance criteria

  • The module is split into a game half and a UI half, mirroring how roulette
    is laid out
  • The module's own file declares both halves and re-exports what the rest of
    the casino uses, matching roulette's file line for line in shape
  • No behaviour changes: a round plays identically, including the defects the
    parent spec describes
  • The test suite passes and the linter is clean
  • A round played at the terminal behaves as it did before the move

Blocked by

None — can start immediately.

## Parent #27 ## What to build Craps plays exactly as it does today, with nothing a player could notice, but the module is laid out the way roulette is: a game half holding the bets, the positions and the dice, a UI half holding the prompts and the animation, and the module's own file declaring the two and re-exporting what the rest of the casino needs. Purely mechanical. No rules change, no interface change, no new tests. This exists so that the round engine that follows arrives as a diff about how craps settles rather than a diff about which file things live in. ## Acceptance criteria - [ ] The module is split into a game half and a UI half, mirroring how roulette is laid out - [ ] The module's own file declares both halves and re-exports what the rest of the casino uses, matching roulette's file line for line in shape - [ ] No behaviour changes: a round plays identically, including the defects the parent spec describes - [ ] The test suite passes and the linter is clean - [ ] A round played at the terminal behaves as it did before the move ## Blocked by None — can start immediately.
rosa closed this issue 2026-08-12 17:51:19 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rosa/casino#29
No description provided.