diff options
| author | historia <[not public]> | 2026-10-05 17:31:50 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-10-05 17:31:50 -0400 |
| commit | 516fd29da423432ef6dfded21a984f1d15dcab1a (patch) | |
| tree | eb2dabe325a1335dedac28a93453df643ef986f2 /internal/casino/craps.go | |
| parent | e42952469dadfb3535633c66c881050ac128703c (diff) | |
| download | thehouseoficarus-516fd29da423432ef6dfded21a984f1d15dcab1a.tar.gz | |
fix: slop casino and economy fixes
Diffstat (limited to 'internal/casino/craps.go')
| -rw-r--r-- | internal/casino/craps.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/internal/casino/craps.go b/internal/casino/craps.go index 73c67c4..0abf24b 100644 --- a/internal/casino/craps.go +++ b/internal/casino/craps.go @@ -133,7 +133,8 @@ func (t *crapsTable) join(name string) []Event { return append([]Event{e, t.menu(name)}, timing...) } func (t *crapsTable) remove(name string) { - if len(t.queue) > 0 && t.queue[0] == name { + wasShooter := len(t.queue) > 0 && t.queue[0] == name + if wasShooter { // The queued roll belongs to the shooter; a departing shooter cancels it. t.pendingRollTicks = 0 } @@ -152,6 +153,15 @@ func (t *crapsTable) remove(name string) { t.seen = map[int]bool{} t.phase = phaseWaiting t.window.close() + } else if wasShooter { + // The next shooter starts a fresh come-out. Without this he inherits + // the previous shooter's point (blocking pass/dontpass and bonus + // bets) and made/seen bonus progress. The shared countdown is left + // alone: it belongs to the table, not the shooter. + t.point = 0 + t.rolled = false + t.made = map[int]bool{} + t.seen = map[int]bool{} } } func (t *crapsTable) leave(name string) []Event { @@ -245,7 +255,7 @@ func (t *crapsTable) bet(name, spot string, amount int, w Wallet) []Event { } limit := t.Config.Craps.oddsLimit(b.number, against) if b.odds.Total > 0 { - continue + return reject("Odds already placed on that bet.") } requested := amount amount = roundUpTo(amount, payoutDen) |
