format, lint, more enums, revert fn rename

This commit is contained in:
Snarling
2022-10-05 14:52:48 -04:00
parent a78a84c5b5
commit 068533cd2f
23 changed files with 94 additions and 101 deletions
+1 -2
View File
@@ -145,8 +145,7 @@ const Engine: {
},
decrementAllCounters: function (numCycles = 1) {
for (const counterName of Object.keys(Engine.Counters)) {
const counter = Engine.Counters[counterName];
for (const [counterName, counter] of Object.entries(Engine.Counters)) {
if (counter === undefined) throw new Error("counter should not be undefined");
Engine.Counters[counterName] = counter - numCycles;
}