From cc33072eced3d5460512c09c42ec4531c807d7af Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 19 Sep 2026 01:55:34 -0400 Subject: fix: casino stake preservation, world state reconciliation, casino game registration --- internal/casino/types.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/casino/types.go') diff --git a/internal/casino/types.go b/internal/casino/types.go index 0400df4..e057ba6 100644 --- a/internal/casino/types.go +++ b/internal/casino/types.go @@ -176,11 +176,11 @@ func (c TableConfig) Normalize() TableConfig { if c.MaxBet <= 0 { c.MaxBet = DefaultMaxBet } - // 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() + // Normalize the game's own rule block through its registration, so a new + // game gets its defaults without a third switch to remember. + if def, ok := tableGameDefFor(c.Game); ok { + c = def.normalize(c) + } if c.MaxBet < c.MinBet { c.MaxBet = c.MinBet } -- cgit v1.2.3