F008 — Hand Status
Business Rule
At every betting stage the server assigns each hand ahandStatus label. These labels drive:
- Which hands are highlighted as the favourite (most likely to win)
- Which hands are marked as dead at RIVER (losers)
- Which hand is the winner at RIVER
- UI display in the TS client (favourite badge, win/dead overlays)
HandStatus Values
Four further values exist in the
HandStatus enum (UNDEFINED, IN_NON_BETTING_STAGE, IN_PLAY_PREVIOUS_BETTING_STAGE_NOT_ACTIVE, IN_PLAY_DISABLED, IN_PLAY_WILL_WIN) but are not emitted by the live advance endpoint.
Favourite Logic
At pre-RIVER stages the hand with the highestwinPercentage receives IN_PLAY_FAVOURITE. In the event of a tie the first hand (lowest handIndex) wins the tiebreak.
RIVER Logic
At RIVER the hand evaluator setswinPercentage = 100 (or drawPercentage = 100 for a split) for the winner. The API maps this to IN_PLAY_WINNER; all other hands receive IN_PLAY_DEAD.
TypeScript Implementation
ApiClient.ts maps handStatus to a boolean flag used by the scene:
UMA State Bridge
platform.js exposes handStatus via window._lastStages:
_lastStages is populated:
- At HOLE init (alongside
_holeOdds) - After each advance (FLOP, TURN, RIVER) via
buildGameStatus
window._winnerInfo[i].isWinner is an additional proxy: true ↔ IN_PLAY_WINNER.
Acceptance Criteria
UMA-testable ACs (via state bridge)
Version Parity
Test Coverage
Playwright spec:tests/features/F008-hand-status.spec.ts — AC1–AC5 (UMA).
Run with:
Related Features
- F006 — Odds Calculation (
winPercentagedrives the favourite selection) - F005 — Hand Evaluation (RIVER winner determined by pokersolver →
IN_PLAY_WINNER) - F025 — Dead Hand Display (uses
IN_PLAY_DEADstatus) - F026 — Cant-Lose Display (uses
IN_PLAY_WILL_WIN— not yet implemented in live endpoint)