aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/table.go')
-rw-r--r--internal/casino/table.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/internal/casino/table.go b/internal/casino/table.go
index 2f4473b..08c18bf 100644
--- a/internal/casino/table.go
+++ b/internal/casino/table.go
@@ -129,7 +129,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() }
+
+// Board returns the game's table-only board for the table command: the live
+// wheel, dice layout or paytable, with no balance, command menu, or state
+// prose. Games whose table is a printed felt return nil so the caller can
+// render the felt instead.
+func (t *Table) Board(name string) Snapshot {
+ if b, ok := t.game.(interface{ board(name string) Snapshot }); ok {
+ return b.board(name)
+ }
+ return nil
+}
+func (t *Table) Overview() string { return t.game.overview() }
// Seats lists the seated players in seat order for the look command.
func (t *Table) Seats() []string { return t.game.seats() }