diff --git a/src/level.rs b/src/level.rs index 1a2b097..1775b81 100644 --- a/src/level.rs +++ b/src/level.rs @@ -74,7 +74,7 @@ impl Level { break; } } - for y_r in y..=min(y + 2, LEVEL_WIDTH - 1) { + for y_r in y..=min(y + 2, LEVEL_HEIGHT - 1) { self.discovered[x][y_r] = true; if self.structure[x][y_r] == LevelElement::Wall { break;