Fikser feilmeldingen for en vegg med en ugyldig retning

This commit is contained in:
Kristian Knarvik 2020-03-02 13:18:45 +01:00
parent 2f5ffebfe3
commit d7186d38c3

View File

@ -86,7 +86,7 @@ public final class BoardLoaderUtil {
WallType wallType = WallType.getWallTypeFromID(Integer.parseInt(wallData[0]));
Direction direction = Direction.getDirectionFromID(Integer.parseInt(wallData[1]));
if (direction == null) {
throw new IllegalArgumentException("Invalid direction for tile encountered when loading board file.");
throw new IllegalArgumentException("Invalid direction for wall encountered when loading board file.");
}
wallGrid.setElement(x, y, new Wall(wallType, direction));
}