diff options
| author | historia <[not public]> | 2026-09-05 16:31:22 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-05 16:31:22 -0400 |
| commit | f4ea40c4b3589104dfaced3481ba19c5735889ae (patch) | |
| tree | 66ead13206e52a65e64d6ba5d1576b63954682e9 /internal/casino/machine.go | |
| parent | 9a716a7d2ce514f452b425caedc1a9a15cde09f0 (diff) | |
| download | thehouseoficarus-f4ea40c4b3589104dfaced3481ba19c5735889ae.tar.gz | |
Diffstat (limited to 'internal/casino/machine.go')
| -rw-r--r-- | internal/casino/machine.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/casino/machine.go b/internal/casino/machine.go index c1e93fe..2f8b753 100644 --- a/internal/casino/machine.go +++ b/internal/casino/machine.go @@ -36,6 +36,7 @@ type Machine struct { } func newMachine(roomID int, cfg MachineConfig, rng *rand.Rand) *Machine { + cfg = cfg.Normalize() profile := DefaultHuffAndPuffProfile() if cfg.Payout > 0 { profile = ScaleToRTP(profile, cfg.Payout) @@ -70,7 +71,7 @@ func (m *Machine) setBet(name string, amount int, wallet Wallet) []Event { return m.private("You're in the middle of a spin!") } if amount < m.Config.MinBet || amount > m.Config.MaxBet { - return m.private(fmt.Sprintf("Slot machine bets must be between %d and %d.", m.Config.MinBet, m.Config.MaxBet)) + return m.private(fmt.Sprintf("Slot machine bets must be %s.", betRangeText(m.Config.MinBet, m.Config.MaxBet))) } return m.beginSpinLocked(name, amount, wallet, fmt.Sprintf("%s sets the bet to %d and pulls the lever.", name, amount), |
