aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/craps_ux.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/craps_ux.go')
-rw-r--r--internal/casino/craps_ux.go32
1 files changed, 23 insertions, 9 deletions
diff --git a/internal/casino/craps_ux.go b/internal/casino/craps_ux.go
index 948ab99..10f7fcb 100644
--- a/internal/casino/craps_ux.go
+++ b/internal/casino/craps_ux.go
@@ -8,22 +8,36 @@ import (
func (t *crapsTable) commands(name string) []MenuCommand {
commands := []MenuCommand{}
p := t.players.get(name)
+ simplified := t.Config.Craps.variant() == "simplified"
if p != nil {
// Pass-only editions cannot accept another contract while a point or
// the player's existing pass bet is live.
if t.Config.Craps.allows("come") || t.Config.Craps.allows("buy") || (t.point == 0 && !p.HasBet) {
- target := "<target>"
- if !t.Config.Craps.allows("buy") {
- target = "pass"
+ if simplified {
+ // Pass is the only target, so the bare bet is a rebet.
+ if p.lastBet > 0 {
+ commands = append(commands,
+ MenuCommand{Command: "bet", Desc: fmt.Sprintf("Rebet %d on pass (also: rebet)", p.lastBet)},
+ MenuCommand{Command: "bet <amount>", Desc: "New amount on pass; the dice roll 3 seconds after a bet"})
+ } else {
+ commands = append(commands, MenuCommand{Command: "bet <amount>", Desc: "Wager on pass; the dice roll 3 seconds after a bet"})
+ }
+ } else {
+ target := "<target>"
+ if !t.Config.Craps.allows("buy") {
+ target = "pass"
+ }
+ commands = append(commands, MenuCommand{Command: "bet <amount> on " + target, Desc: "Place a wager; targets: table rules"})
}
- commands = append(commands, MenuCommand{Command: "bet <amount> on " + target, Desc: "Place a wager; targets: table rules"})
}
if p.HasBet {
- if t.shooter() == p && (!t.multiplayer || t.roundElapsed >= crapsBetDelay) {
- commands = append(commands, MenuCommand{Command: "roll", Desc: "Shoot now"})
- }
- if !p.autoRoll {
- commands = append(commands, MenuCommand{Command: "autoroll", Desc: "Roll automatically on your turn"})
+ if !simplified {
+ if t.shooter() == p && (!t.multiplayer || t.roundElapsed >= crapsBetDelay) {
+ commands = append(commands, MenuCommand{Command: "roll", Desc: "Shoot now"})
+ }
+ if !p.autoRoll {
+ commands = append(commands, MenuCommand{Command: "autoroll", Desc: "Roll automatically on your turn"})
+ }
}
for _, b := range p.bets {
if !crapsContract(b.kind) || b.odds.Total > 0 {