don't use manhattanDistWrapped to prevent boat from starting on opposite side of world

This commit is contained in:
Evan
2025-03-16 20:51:44 -07:00
parent f0b2d0d065
commit 9a297308db
+2 -10
View File
@@ -100,16 +100,8 @@ export function closestShoreFromPlayer(
}
return shoreTiles.reduce((closest, current) => {
const closestDistance = manhattanDistWrapped(
gm.cell(target),
gm.cell(closest),
gm.width(),
);
const currentDistance = manhattanDistWrapped(
gm.cell(target),
gm.cell(current),
gm.width(),
);
const closestDistance = gm.manhattanDist(target, closest);
const currentDistance = gm.manhattanDist(target, current);
return currentDistance < closestDistance ? current : closest;
});
}