diff options
Diffstat (limited to 'internal/casino/craps_ux.go')
| -rw-r--r-- | internal/casino/craps_ux.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/internal/casino/craps_ux.go b/internal/casino/craps_ux.go index 7e44e39..0a7932d 100644 --- a/internal/casino/craps_ux.go +++ b/internal/casino/craps_ux.go @@ -22,11 +22,11 @@ func (t *crapsTable) commands(name string) []MenuCommand { commands = append(commands, MenuCommand{Command: "bet <amount>", Desc: "Wager on pass; the dice roll 3 ticks after a bet"}) } } else { - target := "<target>" + target := "<bet>" if !t.Config.Craps.allows("buy") { target = "pass" } - commands = append(commands, MenuCommand{Command: "bet <amount> on " + target, Desc: "Place a wager; targets: list"}) + commands = append(commands, MenuCommand{Command: "bet <n> on " + target, Desc: "Place a wager"}) } } if p.HasBet { @@ -69,6 +69,17 @@ func crapsContract(kind string) bool { return false } } + +// crapsHasPassLine reports whether the player holds a pass-line contract, so +// the point-established prompt only nudges the people it can pay. +func crapsHasPassLine(p *crapsPlayer) bool { + for _, b := range p.bets { + if b.kind == "pass" { + return true + } + } + return false +} func crapsBetLabel(b *crapsBet) string { names := map[string]string{"pass": "Pass", "dontpass": "Don't pass", "come": "Come", "dontcome": "Don't come", "ace-deuce": "Ace-deuce", "small": "All Small", "tall": "All Tall", "all": "All", "fire": "Fire"} label := names[b.kind] |
