aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/machine.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/machine.go')
-rw-r--r--internal/casino/machine.go3
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),