Skip to main content

F014 — Multi-stage Betting

FieldValue
IDF014
Phase2 — Betting
JiraHEDGE-133
StatusTS ⬜ · JS ⬜ · UMA ⬜

Business Rule

Texas HedgeEm supports up to four betting windows, each corresponding to a game stage. The operator configures which stages are active at installation time. Available betting stages:
Stage nameWhenCards visibleHedgeEm dealStatus
ANTE-BETBefore any cards dealtNonePre-deal (-1)
PRE-FLOPAfter hole cards dealtHole cards onlyHole (0)
POST-FLOPAfter flop dealtHole + 3 communityFlop (1)
TURNAfter turn card dealtHole + 4 communityTurn (2)
There is no betting window at the River — betting always closes before the final card is dealt. Default configuration: POST-FLOP only (single betting stage). The operator can enable any combination of the four stages.

Source: Game Concept Document

“In its default configuration there is only one betting stage (POST-FLOP) but the operator can choose to enable other betting stages: ANTE-BET, PRE-FLOP, POST-FLOP, and TURN.”
“The configuration changes the gameplay experience to suit the target audience.”

Current Implementation vs Design Doc

The TypeScript standalone client currently implements three betting stages (PRE-FLOP / POST-FLOP / TURN, i.e. hole/flop/turn). This is intentional for the reference implementation — it showcases the full multi-stage betting experience. The POST-FLOP-only default from the design doc is for the simpler/faster operator configuration. The JavaScript reference client at hedgeem.qeetoto.com should be audited to confirm which stages are active.

Design Detail

Per-stage bet accumulation

Each bet is recorded with its stage at placement:
interface Bet {
    stage:       number;   // 0=hole(PRE-FLOP), 1=flop(POST-FLOP), 2=turn(TURN)
    handIndex:   number;
    stakeAmount: number;
    oddsAtBet:   number;   // odds locked at placement time
}
Bets from all active stages accumulate. At river, only the winning hand’s bets across all stages are paid (F015).

Ante-Bet stage

ANTE-BET (before hole cards) is not implemented in the current TS or JS clients. When implemented:
  • No cards visible
  • Odds would be equal for all hands (pure speculation, no information)
  • dealStatus = -1 — betting window added before advance() to hole

Operator configuration scope

Configuring betting stages is an installation-time setting (F032), not a per-game or per-player option.

JavaScript Reference

JS Source: Audit required to confirm which stages are active in the live JS client at hedgeem.qeetoto.com.

TypeScript Implementation

Current status: Three betting stages active (hole/flop/turn = PRE-FLOP/POST-FLOP/TURN). Stage is enforced in GameEngine.placeBet():
placeBet(handIndex: number, stakeAmount: number): boolean {
    if (this.dealStatus < 0 || this.dealStatus > 2) return false; // betting only at stages 0,1,2
    ...
}
ANTE-BET (dealStatus = -1) is not currently enabled.

Acceptance Criteria

#CriterionJSTSUMA
AC1Bets can be placed at each configured active stage✅ (3 stages)
AC2Bets cannot be placed at river (dealStatus = 3)
AC3Bets from all stages accumulate in bets[]
AC4Stage identifier stored with each bet for payout traceability
AC5Operator can configure POST-FLOP only (single stage)
AC6ANTE-BET stage: betting before hole cards

Version Parity

VersionStatusNotes
JS (reference)⬜ Not auditedLive config unknown — audit required
TS⬜ Partial3 of 4 stages active; ANTE-BET not implemented
UMA⬜ Not auditedPhase 5
  • F004 — Game Stages (stage definitions and transitions)
  • F011 — Bet Placement (per-stage mechanics)
  • F015 — Payout Calculation (bets from all stages resolved)
  • F032 — RTP Config (operator stage configuration)