F104 — Hidden Odds Debug Panel
Business Rule
The game normally shows players only the rounded odds (odds_rnd) for their current betting stage. All other probability and margin data is hidden.
When the Show hidden odds setting is enabled, a debug panel is displayed alongside the game showing the full odds chain for each hand at the current stage:
Plus: undealt cards count (deck size minus dealt cards).
The toggle defaults to off. It is intended for QA, development, and demonstration purposes.
Technical Design
Odds chain (server)
All fields are computed server-side incomputeOddsChain() (api/_lib/utils.ts):
HedgeEmHandOdds API type was extended to include all chain fields:
Bug: historical stage odds (HEDGE-226)
The GET/api/tables/:id/state endpoint currently only returns odds for the current stage. Historical stage odds (e.g. HOLE odds when at FLOP) are overwritten in game_table_state.hand_odds on each /advance call. Fixing this requires storing odds per-stage (separate columns or a JSON map keyed by stage). F104 displays current-stage odds only until HEDGE-226 is resolved.
v4 — JS reference
Fully implemented. Settings panel toggle →ENABLE_SHOW_HIDDEN_ODDS flag → drawSummaryInfo global → debug popup rendered as a DOM overlay.
v6 — Phaser 3 / TypeScript
- Toggle added to config overlay (row: “Show hidden odds”, flag:
cfgShowHiddenOdds) - When enabled: Phaser
Graphics+Textobjects render a table in the top-right corner of the canvas - Data sourced from
GameSnapshot.handOdds(extended fields from API) - Re-rendered on each
_renderHandPanels()call
v7 — Horse Race / HTML+CSS
- Toggle button added to race UI toolbar
- When enabled: HTML
<table>panel injected into the DOM, positioned over the info panel area - Data sourced from
window.__hedgeem.getSnapshot().handOdds - Updated on each
hedgeem:stateUpdateevent
v8 — Casino / HTML+CSS
- Toggle button added to status bar
- When enabled: HTML
<table>panel overlaid on the table - Same data source as v7