From 6232d41e5639f9c38e47b2bb65266e343ca26e8f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 3 Oct 2026 02:16:00 -0400 Subject: feat: add casino_hints option and standardize casino command syntax --- internal/casino/machine.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'internal/casino/machine.go') 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 '.") + 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 '.") + 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 ", 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 { -- cgit v1.2.3