From e10621c08c5ed855ce230f3af3c035539e442139 Mon Sep 17 00:00:00 2001 From: Manuel Friedli Date: Wed, 30 Sep 2020 23:38:15 +0200 Subject: [PATCH] Fix 1x1 labyrinths. --- src/main/java/ch/fritteli/labyrinth/Labyrinth.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/fritteli/labyrinth/Labyrinth.java b/src/main/java/ch/fritteli/labyrinth/Labyrinth.java index 93d19a9..17a4720 100644 --- a/src/main/java/ch/fritteli/labyrinth/Labyrinth.java +++ b/src/main/java/ch/fritteli/labyrinth/Labyrinth.java @@ -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); } }