Skip to main content

F008 — Hand Status

Business Rule

At every betting stage the server assigns each hand a handStatus 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 highest winPercentage 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 sets winPercentage = 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
At RIVER, window._winnerInfo[i].isWinner is an additional proxy: trueIN_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:
  • F006 — Odds Calculation (winPercentage drives the favourite selection)
  • F005 — Hand Evaluation (RIVER winner determined by pokersolver → IN_PLAY_WINNER)
  • F025 — Dead Hand Display (uses IN_PLAY_DEAD status)
  • F026 — Cant-Lose Display (uses IN_PLAY_WILL_WIN — not yet implemented in live endpoint)