26 lines
1.4 KiB
Markdown
26 lines
1.4 KiB
Markdown
## Why
|
|
|
|
Three bugs prevent proper gameplay: table settings from the setup page are ignored by the game, the bot decision timer resets incorrectly causing wrong countdowns, and opponent hand cards never reveal during showdown or all-in situations per poker rules.
|
|
|
|
## What Changes
|
|
|
|
- **Settings persistence**: Read `sessionStorage` config in the main game page and apply it to initialize game state instead of hardcoding the `trainingMix` preset
|
|
- **Bot timer fix**: Break the reactivity loop in `DecisionTimer.svelte` so the countdown decrements correctly without being reset by `$effect` re-runs
|
|
- **Card reveal rules**: Implement proper poker card visibility — show opponent hands at showdown, and when all-in players can no longer bet
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
- `game-config-persistence`: Loading table configuration from setup page into the game session
|
|
- `card-reveal-rules`: Showing opponent hole cards according to poker showdown and all-in rules
|
|
|
|
### Modified Capabilities
|
|
- `decision-timer`: Fixing countdown reset behavior so timer decrements correctly per second
|
|
|
|
## Impact
|
|
|
|
- `src/routes/+page.svelte` — read sessionStorage config, apply to game state
|
|
- `src/lib/components/DecisionTimer.svelte` — fix reactivity loop
|
|
- `src/lib/components/PlayerSeat.svelte` — add card reveal logic
|
|
- `src/lib/components/PokerTable.svelte` — pass reveal context to PlayerSeat
|