Fix stuff; add new problem "Labyrinthine puzzle" from game Labyrinthine Chapter I

This commit is contained in:
Niklas Birk
2021-04-12 16:11:46 +02:00
parent 6937e28cdd
commit 3fed93055f
5 changed files with 161 additions and 31 deletions

View File

@ -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;
}