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.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/casino/table.go b/internal/casino/table.go
index d9d3525..4ab4e3a 100644
--- a/internal/casino/table.go
+++ b/internal/casino/table.go
@@ -153,6 +153,20 @@ func (t *Table) Busy(name string) bool {
return false
}
+// stakeMultiple is the optional interface for a game whose wallet debit is a
+// multiple of the player's stated stake. Coin Flip reserves 100x so a -100
+// swing is fully covered; every other game debits the stake itself.
+type stakeMultiple interface{ stakeMultiple() int }
+
+// StakeMultiple reports how many credits the game debits per unit of the
+// player's stated stake. It sizes "bet max" and affordability previews.
+func (t *Table) StakeMultiple() int {
+ if m, ok := t.game.(stakeMultiple); ok {
+ return m.stakeMultiple()
+ }
+ return 1
+}
+
// Seats lists the seated players in seat order for the look command.
func (t *Table) Seats() []string { return t.game.seats() }