Skip to main content

F020 — Deal Button / Auto-deal on Load

Business Rule

The game must start at the hole stage immediately on load — hole cards face-up, community cards face-down, hand odds visible, betting UI active. No player action is required to initiate the first deal. After river is resolved, a DEAL button appears so the player can start the next game. The DEAL button is hidden at all other times.

JavaScript Reference

JS Source: hedgeem-v4/odobo/src/js/control.js
AdvanceGameState() loops through:
All states up to CC_ALLOW_BETS_1 are CC_AUTO_ADVANCE — they run without player input. The loop stops at CC_ALLOW_BETS_1 which is CC_AWAIT_INPUT (hole betting window). JS Live: hedgeem.qeetoto.com — loads directly at hole stage.

Between games (JS)

After river resolution the JS state machine auto-advances:
The next game starts automatically with no player action. There is no explicit DEAL button in JS — the green advance button triggers each stage transition.

TypeScript Implementation

File: standalone_reference_client/src/scenes/GameScene.ts

Fix applied (HEDGE-134)

Added this._onDeal() call at the end of GameScene.create():
_onDeal() handles:
  1. Hides DEAL button
  2. Loads local game (engine.loadLocalGame())
  3. Advances to hole (engine.advance() → dealStatus=0)
  4. Renders the hole stage
  5. Shows advance button

Between games (TS — design difference)

Unlike JS (fully automatic), TS shows the DEAL button after river so the player explicitly starts the next game. This is a deliberate UX difference — considered acceptable for v5.

Acceptance Criteria

Version Parity

Test Coverage