diff options
| author | historia <[not public]> | 2026-09-29 14:15:06 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-29 14:15:06 -0400 |
| commit | 3db3071c444abb2133e1fcaf7e685095415c1adf (patch) | |
| tree | a1d3c276aa7db2e89ea92a5751a81c197a1e1103 /internal/casino/table_ux.go | |
| parent | 9803facd4368420a5dce3af59c835e13cb015cf5 (diff) | |
| download | thehouseoficarus-3db3071c444abb2133e1fcaf7e685095415c1adf.tar.gz | |
feat: better roulette wheel design
Diffstat (limited to 'internal/casino/table_ux.go')
| -rw-r--r-- | internal/casino/table_ux.go | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/internal/casino/table_ux.go b/internal/casino/table_ux.go index 48ea46e..cec766d 100644 --- a/internal/casino/table_ux.go +++ b/internal/casino/table_ux.go @@ -13,8 +13,7 @@ func (c TableConfig) RulesText() string { case GameBaccarat: return c.BaccaratRulesText() case GameRoulette: - s := &RouletteSnapshot{DoubleZero: c.Roulette.DoubleZero, Phase: "betting"} - return c.Label() + "\n" + s.ASCII() + "\nStraight numbers pay 35:1; dozens/columns 2:1; other outside bets 1:1.\nZero pockets lose all outside bets. One wager per spin. Use help roulette." + return c.Label() + "\nStraight numbers pay 35:1; dozens/columns 2:1; other outside bets 1:1.\nZero pockets lose all outside bets. One wager per spin. Use help roulette." default: return c.Label() } @@ -47,16 +46,25 @@ func (c *tableCore[P]) overview() string { } func (c *tableCore[P]) overviewLocked() string { + // Concise enough to sit beside a look minimap without wrapping into it. + // The betting countdown lives in the menu heading and warning lines. state := "Betting open" switch c.phase { - case phaseBetting: - state = fmt.Sprintf("Betting closes in %d ticks", c.window.timer.remaining()) case phasePlaying: - state = "Round in progress" + state = "In progress" case phaseInsurance: - state = "Insurance decisions" + state = "Insurance" } - return fmt.Sprintf("%s | Limits %s | %d/%d seated | %s", c.Config.Label(), betRangeText(c.Config.MinBet, c.Config.MaxBet), c.players.count(), c.Config.MaxPlayers, state) + return fmt.Sprintf("%s | Limits %s | %d/%d seated | %s", c.Config.Label(), compactBetRange(c.Config.MinBet, c.Config.MaxBet), c.players.count(), c.Config.MaxPlayers, state) +} + +// compactBetRange renders the wager range in the short form used by the +// one-line table overview (the verbose form stays in the betting menu). +func compactBetRange(minBet, maxBet int) string { + if maxBet == maxBetUnlimited { + return fmt.Sprintf("%d+", minBet) + } + return fmt.Sprintf("%d-%d", minBet, maxBet) } func (c *tableCore[P]) warning(name, text string) Event { |
