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/video_poker.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'internal/casino/video_poker.go') diff --git a/internal/casino/video_poker.go b/internal/casino/video_poker.go index cc4ccfa..a22d3c8 100644 --- a/internal/casino/video_poker.go +++ b/internal/casino/video_poker.go @@ -503,8 +503,23 @@ func (t *videoPokerTable) drawLocked(name string, p *pokerPlayer) []Event { } t.banks = banks p.active = false - p.result = fmt.Sprintf("Total return %d coins = %d credits", p.payout/p.denomination, p.payout) + p.result = "" events := t.statusLocked(name, false) + lines := make([]SettlementLine, 0, len(p.lines)) + for i, hand := range p.lines { + stake := p.wager.Total / p.hands + returned := hand.Coins * p.denomination + result := "loss" + if hand.Coins > 0 { + result = "win" + } + odds := "Varies" + if hand.Coins > 0 { + odds = profitOdds(returned-stake, stake) + } + lines = append(lines, SettlementLine{Label: fmt.Sprintf("Hand %d ยท %s", i+1, hand.Category), Odds: odds, Stake: stake, Returned: returned, Result: result}) + } + events[0].Settlement = lines if p.disconnected { delete(t.players, name) } -- cgit v1.2.3