aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-29 16:50:40 -0400
committerhistoria <[not public]>2026-09-29 16:50:40 -0400
commit00fe5f7ead43627fa283035b27365924b76c5a0f (patch)
tree07546518a51aaa037d64813f40eb6dc4596bd9cb /internal/game/casino.go
parentbfe22e10b5b9f2c7039d1d67021229659a06a226 (diff)
downloadthehouseoficarus-00fe5f7ead43627fa283035b27365924b76c5a0f.tar.gz
feat: roulette bets street, corner, split, etc.
Diffstat (limited to 'internal/game/casino.go')
-rw-r--r--internal/game/casino.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/internal/game/casino.go b/internal/game/casino.go
index 8c10dfd..9282653 100644
--- a/internal/game/casino.go
+++ b/internal/game/casino.go
@@ -431,6 +431,10 @@ func (g *Game) executeBet(sess *net.Session, args []string, rawInput string) {
// sets the wager and any other token is the bet target; AFTER "on", the
// next token is always the target. That makes numeric targets reachable
// ("bet 5 on 17"), which roulette, craps, and keno need.
+ // Roulette combination bets need a multi-token target ("split 1 2",
+ // "corner 1 2 4 5"), so a roulette table joins every extra target token.
+ // Every other game keeps the stricter one-token target and its usage error.
+ joinTarget := table.Config.Game == casino.GameRoulette
amount, spot, hasAmount, sawOn := 0, "", false, false
for i, arg := range args {
if strings.EqualFold(arg, "on") {
@@ -472,11 +476,16 @@ func (g *Game) executeBet(sess *net.Session, args []string, rawInput string) {
continue
}
}
- if spot != "" {
- sess.WriteLine("Use bet, bet <amount> [on <target>], bet min, or bet max.")
- return
+ if spot == "" {
+ spot = strings.ToLower(arg)
+ continue
}
- spot = strings.ToLower(arg)
+ if joinTarget {
+ spot += " " + strings.ToLower(arg)
+ continue
+ }
+ sess.WriteLine("Use bet, bet <amount> [on <target>], bet min, or bet max.")
+ return
}
if table.Config.Game == casino.GameBaccarat {
switch spot {