aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/table_ux.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/table_ux.go')
-rw-r--r--internal/casino/table_ux.go22
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 {