Business Rule
At the RIVER stage, every hand is evaluated against the 5 community cards to produce a standard Texas Hold’em hand ranking. The hand with the highest ranking wins. The 10 valid hand rankings (highest to lowest):
Evaluation is performed server-side by the poker hand evaluator (node-poker-odds-calculator / pokersolver). The client receives pre-computed
handName and handStatus per hand in the API response at STATUS_RIVER.
Technical Design
API response (STATUS_RIVER)
Each entry inhandOdds[] contains:
handName— pokersolver hand classification string (one of the 10 rankings above)handStatus—"IN_PLAY_WINNER"for the winning hand,"IN_PLAY"for losers
UMA client state bridge
platform.js builds a debug array at RIVER and exposes it for Playwright assertions:
handName → prizeId mapping
The GDK uses
prizeId to trigger the win animation and display the hand name banner.
Acceptance Criteria
- AC1 — At RIVER,
_winnerInfois defined and contains exactly one entry per hand (length equals_holeCards.length) - AC2 — Every hand in
_winnerInfohas a validhandName(one of the 10 standard poker rankings) - AC3 — Exactly one hand has
isWinner === true - AC4 — The winning hand has the highest (or tied-highest) poker hand rank among all hands
- AC5 — The winning hand’s
prizeIdcorrectly maps to itshandName(e.g.'Full House'→'full_house')
Version Parity
Known Discrepancies
None documented yet.Test Coverage
Playwright spec:tests/features/F005-hand-evaluation.spec.ts — AC1–AC5.
Run with: