diff options
| author | historia <[not public]> | 2026-10-01 22:47:41 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-01 22:47:41 -0400 |
| commit | 8eea0e4e06a4aaa6a18edabd9897d3bea1ea2ca0 (patch) | |
| tree | 63698c0618f382a553d4558a33e3d2087039c378 /internal/casino/table_ux.go | |
| parent | 6d9908b29c8187196d23b126b1165c7e0bd0fc76 (diff) | |
| download | thehouseoficarus-8eea0e4e06a4aaa6a18edabd9897d3bea1ea2ca0.tar.gz | |
feat: consistent wager outcome table across casino games
Diffstat (limited to 'internal/casino/table_ux.go')
| -rw-r--r-- | internal/casino/table_ux.go | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/internal/casino/table_ux.go b/internal/casino/table_ux.go index 4251e4f..569128b 100644 --- a/internal/casino/table_ux.go +++ b/internal/casino/table_ux.go @@ -283,15 +283,26 @@ func (t *blackjackTable) insuranceMenuLocked(p *blackjackPlayer) Event { // the itemized line (empty for a lone anonymous hand); Result is the engine's // settlement word ("win", "loss", "bust", "push", "blackjack", // "surrender", "insurance"). -type settlementLine struct { - Label string - Result string - Stake int - Returned int - Tag string // optional color-category override (jackpot, for example) +type SettlementLine struct { + // Odds are profit odds, not total-return multipliers. Unresolved wagers + // retain their stake and are excluded from settlement totals. + Odds string + Unresolved bool + Label string + Result string + Stake int + Returned int + Tag string // optional color-category override (jackpot, for example) } -func (l settlementLine) net() int { return l.Returned - l.Stake } +type settlementLine = SettlementLine + +func (l SettlementLine) net() int { + if l.Unresolved { + return 0 + } + return l.Returned - l.Stake +} // resultTextLabel renders a settled wager as a colored outcome plus its net, // naming the bet on its own line. |
