Skip to main content

F022 — Card Display

Business Rule

At the hole stage, all hole cards for all hands must be face-up and visible to the player. Community cards (flop/turn/river) are dealt face-down and revealed progressively as each betting stage is reached.

JavaScript Reference

JS Source: hedgeem-v4/odobo/src/js/control.js The JS state machine deals all 13 cards (2 per hand × up to 4 hands + 5 community) via a sequence of CC_DEAL_CARDx states, all of which are CC_AUTO_ADVANCE. Each call to DealCard() reveals the card immediately. All hole cards are face-up before the first betting window (CC_ALLOW_BETS_1) is reached.
Community cards are initially rendered face-down and flipped when their stage is reached.

TypeScript Implementation

File: standalone_reference_client/src/scenes/GameScene.ts

Bug fixed (HEDGE-135)

The original face-up logic was:
This only revealed hole cards for hand 0. Hands 1, 2, and 3 were face-down at hole stage. Fix applied:
Community cards (hand === -1) are handled separately: face-up when dealStatus >= the stage that reveals them (flop=1, turn=2, river=3).

Acceptance Criteria

Version Parity

Test Coverage