aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/table_ux.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-01 15:47:17 -0400
committerhistoria <[not public]>2026-10-01 15:47:17 -0400
commitc94728c929045f7c1bdf0166df152d944e5f99bc (patch)
tree3d677caf166da36cd12ae200cc4c5d7a789d5c8f /internal/casino/table_ux.go
parent1082f3336085c15992ca83d5553c0ba52208d70a (diff)
downloadthehouseoficarus-c94728c929045f7c1bdf0166df152d944e5f99bc.tar.gz
feat: better casino game look output, more concise table instructions
Diffstat (limited to 'internal/casino/table_ux.go')
-rw-r--r--internal/casino/table_ux.go26
1 files changed, 18 insertions, 8 deletions
diff --git a/internal/casino/table_ux.go b/internal/casino/table_ux.go
index 55c491b..d0211f3 100644
--- a/internal/casino/table_ux.go
+++ b/internal/casino/table_ux.go
@@ -77,17 +77,27 @@ 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.
- return fmt.Sprintf("%s | Limits %s | %d/%d seated", c.Config.Label(), compactBetRange(c.Config.MinBet, c.Config.MaxBet), c.players.count(), c.Config.MaxPlayers)
+ // The betting countdown lives in the menu heading and warning lines; the
+ // wager range is shown in the betting menu and on the rule card instead.
+ return fmt.Sprintf("%s | %d/%d seated", c.Config.Label(), c.players.count(), c.Config.MaxPlayers)
}
-// 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)
+// seats lists the seated players in seat order for the look details view.
+func (c *tableCore[P]) seats() []string {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ names := make([]string, 0, c.players.count())
+ for _, p := range c.players.ordered() {
+ names = append(names, p.participantPtr().Name)
}
- return fmt.Sprintf("%d-%d", minBet, maxBet)
+ return names
+}
+
+// state is the shared lifecycle phase for the look details view.
+func (c *tableCore[P]) state() string {
+ c.mu.Lock()
+ defer c.mu.Unlock()
+ return string(c.phase)
}
func (c *tableCore[P]) warning(name, text string) Event {