Fix 1x1 labyrinths.
This commit is contained in:
parent
cbada5bd2c
commit
e10621c08c
1 changed files with 4 additions and 2 deletions
|
@ -44,12 +44,14 @@ public class Labyrinth {
|
||||||
private void hardenWalls(@NonNull final Tile tile, final int x, final int y) {
|
private void hardenWalls(@NonNull final Tile tile, final int x, final int y) {
|
||||||
if (x == 0) {
|
if (x == 0) {
|
||||||
tile.preventDiggingToOrFrom(Direction.LEFT);
|
tile.preventDiggingToOrFrom(Direction.LEFT);
|
||||||
} else if (x == this.width - 1) {
|
}
|
||||||
|
if (x == this.width - 1) {
|
||||||
tile.preventDiggingToOrFrom(Direction.RIGHT);
|
tile.preventDiggingToOrFrom(Direction.RIGHT);
|
||||||
}
|
}
|
||||||
if (y == 0) {
|
if (y == 0) {
|
||||||
tile.preventDiggingToOrFrom(Direction.TOP);
|
tile.preventDiggingToOrFrom(Direction.TOP);
|
||||||
} else if (y == this.height - 1) {
|
}
|
||||||
|
if (y == this.height - 1) {
|
||||||
tile.preventDiggingToOrFrom(Direction.BOTTOM);
|
tile.preventDiggingToOrFrom(Direction.BOTTOM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue