aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/video_poker.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/video_poker.go')
-rw-r--r--internal/casino/video_poker.go17
1 files changed, 16 insertions, 1 deletions
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)
}