Switch gate watchers to notify on input mask changes, add DivideByNCounter

This commit is contained in:
Stone_Red
2026-03-27 03:09:52 +01:00
parent 5b3cdc186f
commit 1deb90a1f0
6 changed files with 161 additions and 21 deletions
@@ -84,7 +84,6 @@ public sealed class EventCircuitSimulator : SimulatorBase
if (outputMasks[gateId] != oldOutput)
{
Propagate(gateId);
NotifyGateWatchers(gateId);
}
}
}
@@ -103,6 +102,10 @@ public sealed class EventCircuitSimulator : SimulatorBase
if (oldBit != outVal)
{
inputMasks[toGate] ^= 1 << bit;
if (hasAnyWatchers)
{
NotifyGateWatchers(toGate);
}
Enqueue(toGate);
}
}