about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-01-07 18:55:05 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2025-01-07 18:55:05 -0500
commitc6c31e01b863c4c5f0ba27c86838c825ef0ce4ea (patch)
tree587ff45e9f6db545a7f5f646d2332fc60e80342d
parentef049227efcb6239c6c889911f715d35b8ea9924 (diff)
downloadlingo-ap-tracker-c6c31e01b863c4c5f0ba27c86838c825ef0ce4ea.tar.gz
lingo-ap-tracker-c6c31e01b863c4c5f0ba27c86838c825ef0ce4ea.tar.bz2
lingo-ap-tracker-c6c31e01b863c4c5f0ba27c86838c825ef0ce4ea.zip
Calculate subway door reports after full reachability HEAD main
-rw-r--r--src/tracker_state.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index eee43e4..d372786 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp
@@ -360,6 +360,10 @@ class StateCalculator {
360 // evaluated. 360 // evaluated.
361 for (const Door& door : GD_GetDoors()) { 361 for (const Door& door : GD_GetDoors()) {
362 int discard = IsDoorReachable(door.id); 362 int discard = IsDoorReachable(door.id);
363
364 door_report_[door.id] = {};
365 discard = AreRequirementsSatisfied(
366 GetState().requirements.GetDoor(door.id), &door_report_[door.id]);
363 } 367 }
364 } 368 }
365 369
@@ -522,14 +526,7 @@ class StateCalculator {
522 } 526 }
523 527
524 Decision IsDoorReachable_Helper(int door_id) { 528 Decision IsDoorReachable_Helper(int door_id) {
525 if (door_report_.count(door_id)) { 529 return AreRequirementsSatisfied(GetState().requirements.GetDoor(door_id));
526 door_report_[door_id].clear();
527 } else {
528 door_report_[door_id] = {};
529 }
530
531 return AreRequirementsSatisfied(GetState().requirements.GetDoor(door_id),
532 &door_report_[door_id]);
533 } 530 }
534 531
535 Decision IsDoorReachable(int door_id) { 532 Decision IsDoorReachable(int door_id) {