diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/board/BoardValidator.java | 3 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/model/BlockType.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/board/BoardValidator.java b/src/main/java/fr/umlv/java/wallj/board/BoardValidator.java index e238955..e95446b 100644 --- a/src/main/java/fr/umlv/java/wallj/board/BoardValidator.java +++ b/src/main/java/fr/umlv/java/wallj/board/BoardValidator.java | |||
@@ -91,7 +91,8 @@ public class BoardValidator { | |||
91 | .filter(blockEntry -> blockEntry.getValue().mustBeReachable()) | 91 | .filter(blockEntry -> blockEntry.getValue().mustBeReachable()) |
92 | .allMatch(blockEntry -> blockEntry.getKey().neighbors().stream() | 92 | .allMatch(blockEntry -> blockEntry.getKey().neighbors().stream() |
93 | .filter(neighbor -> inBoard(dim, neighbor)) | 93 | .filter(neighbor -> inBoard(dim, neighbor)) |
94 | .anyMatch(neighbor -> b.getBlockTypeAt(neighbor).isTraversable())); | 94 | .anyMatch(neighbor -> b.getBlockTypeAt(neighbor).isTraversable() || |
95 | b.getBlockTypeAt(neighbor).isMovableByExplosion())); | ||
95 | } | 96 | } |
96 | 97 | ||
97 | /** | 98 | /** |
diff --git a/src/main/java/fr/umlv/java/wallj/model/BlockType.java b/src/main/java/fr/umlv/java/wallj/model/BlockType.java index 9051715..9c5d4f5 100644 --- a/src/main/java/fr/umlv/java/wallj/model/BlockType.java +++ b/src/main/java/fr/umlv/java/wallj/model/BlockType.java | |||
@@ -10,7 +10,7 @@ public enum BlockType { | |||
10 | FREE(false, true, true, false), | 10 | FREE(false, true, true, false), |
11 | WALL(true, false, false, false), | 11 | WALL(true, false, false, false), |
12 | TRASH(true, true, false, false), | 12 | TRASH(true, true, false, false), |
13 | GARBAGE(false, true, true, true), | 13 | GARBAGE(false, true, false, true), |
14 | ROBOT(false, false, true, false), | 14 | ROBOT(false, false, true, false), |
15 | BOMB(false, false, true, false); | 15 | BOMB(false, false, true, false); |
16 | 16 | ||