aboutsummaryrefslogtreecommitdiff
path: root/internal/game/casino.go
diff options
context:
space:
mode:
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 {