Skip to content

Commit

Permalink
refact: Remove debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
Metaphoriker committed Sep 6, 2024
1 parent e85ebc1 commit d6a77c7
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,20 @@ private void evaluateNewNodes(

private double calculatePriorityAdjustment(Node node, List<PathFilterStage> filterStages) {
for (PathFilterStage filterStage : filterStages) {
boolean filterResult = filterStage.filter(
new PathValidationContext(
node.getPosition(),
node.getParent() != null ? node.getParent().getPosition() : null,
snapshotManager)
);
System.out.println("Filter stage result: " + filterResult);
boolean filterResult =
filterStage.filter(
new PathValidationContext(
node.getPosition(),
node.getParent() != null ? node.getParent().getPosition() : null,
snapshotManager));

if (filterResult) {
System.out.println("Priority adjustment applied for node at position: " + node.getPosition());
return node.getHeuristic().get() * (PRIORITY_BOOST_IN_PERCENTAGE / 100.0);
}
}
return 0.0;
}


private boolean isNodeValid(
Node currentNode,
Node newNode,
Expand Down Expand Up @@ -242,8 +239,7 @@ private boolean isNodeInvalid(
return true; // Node is invalid if filters fail
}

return !pathfinderConfiguration.isPrioritizing()
&& !stagesPass;
return !pathfinderConfiguration.isPrioritizing() && !stagesPass;
}

private boolean doAllFiltersPass(List<PathFilter> filters, Node node) {
Expand Down

0 comments on commit d6a77c7

Please sign in to comment.