From e3ff06fc79682673194c8913f0feb9e90920e7d0 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 30 Sep 2026 20:50:45 -0400 Subject: feat: look, rules, and list commands updated for casino games --- internal/casino/table.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'internal/casino/table.go') diff --git a/internal/casino/table.go b/internal/casino/table.go index ddf357f..719bed3 100644 --- a/internal/casino/table.go +++ b/internal/casino/table.go @@ -21,6 +21,12 @@ type tableGame interface { idle() bool status(name string) []Event overview() string + // wagers is the game's live list of bets the player could make right + // now (the "list" command's data; empty when nothing is worth naming, + // which also suppresses the "list" hint). hints is the full live hint + // list, finished with the shared "rules" and (multi-wager) "list". + wagers(name string) []WagerRow + hints(name string) []MenuCommand // base returns the table identity shared with the Table handle. base() *tableBase } @@ -111,3 +117,18 @@ func (t *Table) idle() bool { return t.game.idle() } // Status is a read-only view: it never restarts a deadline or changes a wager. func (t *Table) Status(name string) []Event { return t.game.status(name) } func (t *Table) Overview() string { return t.game.overview() } + +// RulesText is this table's full rule text (the "table rules" wording). +func (t *Table) RulesText() string { return rulesTextOnTable(t.Config) } + +// HelpTopic is the help page the "rules" command opens while seated here. +func (t *Table) HelpTopic() string { return t.Config.HelpTopic() } + +// Wagers is the game's live list of bets the player could make right now. +// Empty when nothing is worth naming (a lone "bet " wager, a +// committed round) — the same signal that suppresses the "list" hint. +func (t *Table) Wagers(name string) []WagerRow { return t.game.wagers(name) } + +// Hints is the game's live hint list, finished with the shared "rules" and +// (multi-wager) "list" entries so look and the menus advertise both. +func (t *Table) Hints(name string) []MenuCommand { return t.game.hints(name) } -- cgit v1.2.3