Fix 1x1 labyrinths.

This commit is contained in:
Manuel Friedli 2020-09-30 23:38:15 +02:00
parent cbada5bd2c
commit e10621c08c

View file

@ -44,12 +44,14 @@ public class Labyrinth {
private void hardenWalls(@NonNull final Tile tile, final int x, final int y) {
if (x == 0) {
tile.preventDiggingToOrFrom(Direction.LEFT);
} else if (x == this.width - 1) {
}
if (x == this.width - 1) {
tile.preventDiggingToOrFrom(Direction.RIGHT);
}
if (y == 0) {
tile.preventDiggingToOrFrom(Direction.TOP);
} else if (y == this.height - 1) {
}
if (y == this.height - 1) {
tile.preventDiggingToOrFrom(Direction.BOTTOM);
}
}