diff options
Diffstat (limited to 'internal/casino/roulette.go')
| -rw-r--r-- | internal/casino/roulette.go | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/internal/casino/roulette.go b/internal/casino/roulette.go index b4dcdf0..2453fed 100644 --- a/internal/casino/roulette.go +++ b/internal/casino/roulette.go @@ -490,11 +490,19 @@ func (t *rouletteTable) view() *RouletteSnapshot { return s } func (t *rouletteTable) menuEvent(name string) Event { - e := t.betMenuEvent(name, []MenuCommand{ - {Command: "bet <amount> on <target>", Desc: "Place one wager per spin (help roulette)"}, - {Command: "bet / rebet", Desc: "Repeat your previous wager"}, - {Command: "table / sitout / stop", Desc: "View layout / sit out / leave after this spin"}, - }) + commands := []MenuCommand{} + p := t.players.get(name) + if t.phase != phasePlaying && p != nil && !p.HasBet { + commands = append(commands, MenuCommand{Command: "bet <amount> on <target>", Desc: "Place one wager; targets: help roulette"}) + if p.lastBet > 0 { + commands = append(commands, MenuCommand{Command: "bet / rebet", Desc: "Repeat your previous wager"}) + } + } + if p != nil { + commands = append(commands, MenuCommand{Command: "sitout / stop", Desc: "Sit out / leave when your wager settles"}) + } + commands = append(commands, MenuCommand{Command: "table", Desc: "View the layout"}) + e := t.betMenuEvent(name, commands) e.Snapshot = t.view() return e } @@ -701,8 +709,10 @@ func (t *rouletteTable) status(name string) []Event { if text := t.seatStatusLocked(name); text != "" { message += "\n" + text } - e := t.private(name, message) - e.Snapshot = t.view() + e := t.menuEvent(name) + e.Message = message + e.Menu.Heading = message + e.Menu.ShowBalance = false events := []Event{e} if t.phase == phaseWaiting && t.lastResult != nil { last := t.private(name, "Last spin:") |
