Skip to main content

F013 — Multi-hand Betting

Business Rule

Each game round deals multiple hands simultaneously. The player may bet independently on any or all of the live hands during each betting window (HOLE, FLOP, TURN). A hand is live if its current odds are > 1. Bets on different hands are entirely independent — betting on hand A does not affect the bet on hand B. Dead hands cannot be bet on.

Hand Count by Version

JavaScript Reference

Source: hedgeem-v4/odobo/src/js/hands.js
  • NUMBER_OF_HANDS = 3 — hardcoded
  • handBetValue[hand][stage] — 2D array tracks bets independently per hand per stage
  • BetOnHand(handIndex)AddBetToHand(hand) — per-hand bet placement

TypeScript Implementation

Source: standalone_reference_client/src/engine/GameEngine.ts
  • numHands config parameter (2–4)
  • this.bets[] — flat array of { handIndex, stage, stakeAmount, oddsAtBet } entries
  • placeBet(handIndex, stakeAmount) — guards dead hands independently per handIndex

UMA Implementation

Source: gameClient/builds/hedgeem/platform.js NUM_HANDS = 3 (line 19). Three hands are always dealt. The GDK (game.min.js) sends one bet entry per hand in each spin packet:
Platform.js iterates gdkBets and posts one /bet request per non-zero entry:
Hands with no bet entry in gdkBets are skipped — no API call is made for them. After each spin, _lastStages is rebuilt from API state. Each hand’s stages array always ends with a trailing sentinel { bet: 0, multiplier: currentOdds } so the GDK can always read _.last(stages).multiplier for the current odds display (HEDGE-150).

State bridge

Test helpers

triggerSpin resets window._betLog = [] before firing so assertions capture only that spin’s bets. After the spin, _stagePhase changes to STATUS_FLOP.

Acceptance Criteria

UMA-testable ACs (via state bridge)

Version Parity

Test Coverage

Playwright spec: tests/features/F013-multi-hand-betting.spec.ts — AC1–AC7 (UMA). Run with:
  • F001 — Hand count rules (number of hands per round)
  • F011 — Bet Placement (single-hand bet mechanics)
  • F015 — Payout calculation (multi-hand payouts)
  • F010 — Chip Denominations (bet amounts used per hand)