aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/machine.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-30 16:16:17 -0400
committerhistoria <[not public]>2026-09-30 16:16:17 -0400
commita4c09c2d38d1f3bc1d3ad4bdb0234bdea7c37e73 (patch)
tree00c9567e620f331a59dd44f1f1fa779ecd94a845 /internal/casino/machine.go
parent724079f8de1ae69965c6267dca3d7fc3cc86afa2 (diff)
downloadthehouseoficarus-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.go20
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
}