From 8eea0e4e06a4aaa6a18edabd9897d3bea1ea2ca0 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 1 Oct 2026 22:47:41 -0400 Subject: feat: consistent wager outcome table across casino games --- internal/casino/table_ux.go | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'internal/casino/table_ux.go') 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. -- cgit v1.2.3