aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/manager.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 20:11:29 -0400
committerhistoria <[not public]>2026-09-18 20:11:29 -0400
commit0f812ccc307ea0550511ccced40b65dfb0cdaa91 (patch)
tree7f2f343985275a478ba7295a37fcd48871ca4956 /internal/casino/manager.go
parent79764732406d6484f67d3dec045483dcb5d08c28 (diff)
downloadthehouseoficarus-0f812ccc307ea0550511ccced40b65dfb0cdaa91.tar.gz
fix: world and casino integrity fixes
Diffstat (limited to 'internal/casino/manager.go')
-rw-r--r--internal/casino/manager.go6
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
}