diff options
| author | historia <[not public]> | 2026-10-03 02:16:00 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-03 02:16:00 -0400 |
| commit | 6232d41e5639f9c38e47b2bb65266e343ca26e8f (patch) | |
| tree | ad0c1676838a6c7e162d3a5c055f914016dac803 /internal/casino/machine.go | |
| parent | efccf58741ae43d9e891c6b743b146982b344ccf (diff) | |
| download | thehouseoficarus-6232d41e5639f9c38e47b2bb65266e343ca26e8f.tar.gz | |
feat: add casino_hints option and standardize casino command syntax
Diffstat (limited to 'internal/casino/machine.go')
| -rw-r--r-- | internal/casino/machine.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/internal/casino/machine.go b/internal/casino/machine.go index 610e745..0733384 100644 --- a/internal/casino/machine.go +++ b/internal/casino/machine.go @@ -103,7 +103,7 @@ func (m *Machine) start(name string, wallet Wallet) []Event { return m.private("You're in the middle of a spin!") } if m.bet <= 0 { - return m.private("Set a wager first with 'bet <amount>'.") + return m.private("Set a wager first with 'bet N'.") } return m.beginSpinLocked(m.bet, wallet, fmt.Sprintf("%s pulls the lever on the slots machine.", name), @@ -139,7 +139,7 @@ func (m *Machine) enableAutoBet(name string, wallet Wallet) []Event { return m.private("You're in the middle of a spin!") } if m.bet <= 0 { - return m.private("Set a wager first with 'bet <amount>'.") + return m.private("Set a wager first with 'bet N'.") } m.player.Wallet = wallet m.autoBet = true @@ -522,12 +522,19 @@ func formatWins(wins []SlotWin, ways int) string { return message[:len(message)-1] } +// Hints is the machine's live command list for the "what" command. +func (m *Machine) Hints() []MenuCommand { + m.mu.Lock() + defer m.mu.Unlock() + return m.commands() +} + func (m *Machine) commands() []MenuCommand { if m.autoBet { return []MenuCommand{{Command: "stop", Desc: "Stop automatic betting"}} } commands := []MenuCommand{ - {Command: "bet <amount>", Desc: "Set your wager and spin"}, + {Command: "bet N", Desc: "Set your wager and spin"}, {Command: "bet max", Desc: "Bet the maximum and spin"}, } if m.bet > 0 { |
