diff options
Diffstat (limited to 'internal/casino/table_ux.go')
| -rw-r--r-- | internal/casino/table_ux.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/casino/table_ux.go b/internal/casino/table_ux.go index 9543d91..48ea46e 100644 --- a/internal/casino/table_ux.go +++ b/internal/casino/table_ux.go @@ -5,7 +5,28 @@ import ( "strings" ) +// RulesText is the shared rules view for table commands and room fixtures. +func (c TableConfig) RulesText() string { + switch c.Game { + case GameBlackjack: + return c.BlackjackRulesText() + case GameBaccarat: + return c.BaccaratRulesText() + case GameRoulette: + s := &RouletteSnapshot{DoubleZero: c.Roulette.DoubleZero, Phase: "betting"} + return c.Label() + "\n" + s.ASCII() + "\nStraight numbers pay 35:1; dozens/columns 2:1; other outside bets 1:1.\nZero pockets lose all outside bets. One wager per spin. Use help roulette." + default: + return c.Label() + } +} + func (c TableConfig) Label() string { + if c.Game == GameRoulette { + if c.Roulette.DoubleZero { + return "Roulette / Double zero" + } + return "Roulette / Single zero" + } if c.Game != GameBaccarat { return gameTitle(c.Game) } |
