Actually use Y and Z bounds for Y and Z

This commit is contained in:
ZacSharp 2020-09-20 22:20:24 +02:00
parent b20e095683
commit 85cc86346c
No known key found for this signature in database
GPG Key ID: 9453647B005083A3

View File

@ -103,8 +103,8 @@ public class GoalRunAway implements Goal {
HashSet<Double> maybeAlwaysInside = new HashSet<>(); HashSet<Double> maybeAlwaysInside = new HashSet<>();
HashSet<Double> sometimesOutside = new HashSet<>(); HashSet<Double> sometimesOutside = new HashSet<>();
for (int x = minX; x <= maxX; x++) { for (int x = minX; x <= maxX; x++) {
for (int y = minX; y <= maxX; y++) { for (int y = minY; y <= maxY; y++) {
for (int z = minX; z <= maxX; z++) { for (int z = minZ; z <= maxZ; z++) {
double h = heuristic(x, y, z); double h = heuristic(x, y, z);
if (!sometimesOutside.contains(h) && isInGoal(x, y, z)) { if (!sometimesOutside.contains(h) && isInGoal(x, y, z)) {
maybeAlwaysInside.add(h); maybeAlwaysInside.add(h);