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.go13
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 {