diff options
Diffstat (limited to 'internal/casino/table.go')
| -rw-r--r-- | internal/casino/table.go | 21 |
1 files changed, 21 insertions, 0 deletions
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 <amount>" 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) } |
