From a4c09c2d38d1f3bc1d3ad4bdb0234bdea7c37e73 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 30 Sep 2026 16:16:17 -0400 Subject: feat: additional craps variants added, standardizard casino command hints --- internal/casino/machine.go | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'internal/casino/machine.go') diff --git a/internal/casino/machine.go b/internal/casino/machine.go index f8730be..36576d0 100644 --- a/internal/casino/machine.go +++ b/internal/casino/machine.go @@ -499,19 +499,25 @@ func formatWins(wins []SlotWin, ways int) string { return message[:len(message)-1] } -var slotCommands = []MenuCommand{ - {Command: "bet ", Desc: "Set your wager"}, - {Command: "bet max", Desc: "Set the maximum wager"}, - {Command: "spin", Desc: "Spin using your current wager"}, - {Command: "autospin", Desc: "Start automatic betting"}, - {Command: "stop", Desc: "Leave the slot machine"}, +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 max", Desc: "Bet the maximum and spin"}, + } + if m.bet > 0 { + commands = append(commands, MenuCommand{Command: "spin", Desc: "Spin using your current wager", Cost: m.bet}, MenuCommand{Command: "autospin", Desc: "Start automatic betting", Cost: m.bet}) + } + return append(commands, MenuCommand{Command: "stop", Desc: "Leave the slot machine"}) } func (m *Machine) privateMenu(prefix string) []Event { events := m.private(prefix) events[0].Color = "casino_menu" if m.phase == machineReady { - events[0].Menu = &MenuView{Heading: prefix, ShowBalance: true, Commands: slotCommands} + events[0].Menu = &MenuView{Heading: prefix, ShowBalance: true, Commands: m.commands()} } return events } -- cgit v1.2.3