Fix stuff; add new problem "Labyrinthine puzzle" from game Labyrinthine Chapter I
This commit is contained in:
@ -86,8 +86,8 @@ class AStarTest
|
||||
|
||||
if (targetPos != null && actualPos != null)
|
||||
{
|
||||
final var xDistance = Math.abs(targetPos.getX() - actualPos.getX());
|
||||
final var yDistance = Math.abs(targetPos.getY() - actualPos.getY());
|
||||
final var xDistance = Math.abs(targetPos.x() - actualPos.x());
|
||||
final var yDistance = Math.abs(targetPos.y() - actualPos.y());
|
||||
|
||||
manhattanDistance += xDistance + yDistance;
|
||||
}
|
||||
|
Reference in New Issue
Block a user