From 00fe5f7ead43627fa283035b27365924b76c5a0f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 29 Sep 2026 16:50:40 -0400 Subject: feat: roulette bets street, corner, split, etc. --- internal/game/casino.go | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'internal/game/casino.go') 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 [on ], 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 [on ], bet min, or bet max.") + return } if table.Config.Game == casino.GameBaccarat { switch spot { -- cgit v1.2.3