diff options
| author | historia <[not public]> | 2026-09-30 16:16:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-30 16:16:17 -0400 |
| commit | a4c09c2d38d1f3bc1d3ad4bdb0234bdea7c37e73 (patch) | |
| tree | 00c9567e620f331a59dd44f1f1fa779ecd94a845 /internal/casino/machine.go | |
| parent | 724079f8de1ae69965c6267dca3d7fc3cc86afa2 (diff) | |
| download | thehouseoficarus-a4c09c2d38d1f3bc1d3ad4bdb0234bdea7c37e73.tar.gz | |
feat: additional craps variants added, standardizard casino command hints
Diffstat (limited to 'internal/casino/machine.go')
| -rw-r--r-- | internal/casino/machine.go | 20 |
1 files changed, 13 insertions, 7 deletions
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 <amount>", 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 <amount>", 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 } |
