aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/types.go')
-rw-r--r--internal/casino/types.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/casino/types.go b/internal/casino/types.go
index 080e60a..71da01c 100644
--- a/internal/casino/types.go
+++ b/internal/casino/types.go
@@ -162,6 +162,11 @@ func (c TableConfig) Normalize() TableConfig {
if c.MaxBet < c.MinBet {
c.MaxBet = c.MinBet
}
+ // Normalize the nested game rule blocks too: a new game that reads
+ // t.Config.Blackjack/Baccarat directly (rather than only t.Rules) would
+ // otherwise see zero values and build an empty shoe.
+ c.Blackjack = c.Blackjack.Normalize()
+ c.Baccarat = c.Baccarat.Normalize()
return c
}