aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/types.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 15:16:44 -0400
committerhistoria <[not public]>2026-09-18 15:16:44 -0400
commit7eab582d8a8ee2af1a6baae7baf0696c7005de2e (patch)
tree902bbc8c6e39c9f62f779ca23267714ec420b9f5 /internal/casino/types.go
parent153acb7f644d755c45533b7c5311e3ffa47e8973 (diff)
downloadthehouseoficarus-7eab582d8a8ee2af1a6baae7baf0696c7005de2e.tar.gz
fix: harden triggers, economy, casino, world data, and admin/net paths
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
}