diff options
| author | historia <[not public]> | 2026-09-18 20:11:29 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 20:11:29 -0400 |
| commit | 0f812ccc307ea0550511ccced40b65dfb0cdaa91 (patch) | |
| tree | 7f2f343985275a478ba7295a37fcd48871ca4956 /internal/casino/manager.go | |
| parent | 79764732406d6484f67d3dec045483dcb5d08c28 (diff) | |
| download | thehouseoficarus-0f812ccc307ea0550511ccced40b65dfb0cdaa91.tar.gz | |
fix: world and casino integrity fixes
Diffstat (limited to 'internal/casino/manager.go')
| -rw-r--r-- | internal/casino/manager.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/casino/manager.go b/internal/casino/manager.go index b71e5df..d9b2c3e 100644 --- a/internal/casino/manager.go +++ b/internal/casino/manager.go @@ -75,9 +75,9 @@ func (m *Manager) EnsureMachine(roomID int, cfg MachineConfig) *Machine { m.mu.Lock() defer m.mu.Unlock() if machine := m.machines[key]; machine != nil { - // DeepEqual (not ==) so the *bool rule fields compare by value; - // == would treat every freshly parsed config as different and - // discard an idle machine on every room load. + // DeepEqual (not ==) compares the config by value and stays correct + // as rule structs gain pointer/slice fields; == would panic or, for + // a struct with incomparable fields, fail to compile. if reflect.DeepEqual(machine.Config, cfg) { return machine } |
