Skip to content

Commit

Permalink
Now using the fCost in the pathfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
Metaphoriker committed Jul 2, 2024
1 parent d32ce21 commit db5e2af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public boolean isTarget() {
*
* @return the estimated total cost (represented by the F-Score)
*/
private double getFCost() {
public double getFCost() {
return fCostCache.get();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ protected PathfinderResult resolvePath(
PathPosition start, PathPosition target, List<PathFilter> filters) {
Node startNode = createStartNode(start, target);
FibonacciHeap<Double, Node> nodeQueue = new FibonacciHeap<>();
nodeQueue.insert(
startNode.getHeuristic().get(), startNode); // TODO: 25.06.2024 Rename to getCost()
nodeQueue.insert(startNode.getFCost(), startNode);

Set<PathPosition> examinedPositions = new HashSet<>();
int depth = 1;
Expand Down

0 comments on commit db5e2af

Please sign in to comment.