aboutsummaryrefslogtreecommitdiff
path: root/src/world.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.rs')
-rw-r--r--src/world.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/world.rs b/src/world.rs
index b0be50a..f9c8b2e 100644
--- a/src/world.rs
+++ b/src/world.rs
@@ -171,6 +171,13 @@ impl Corridor {
grid.set_tile(x, y, TileType::Floor);
grid.set_empty_tile(x + 1, y, TileType::Wall);
}
+ // Wall ends
+ grid.set_empty_tile(x - 1, self.start.1, TileType::Wall);
+ grid.set_empty_tile(x, self.start.1, TileType::Wall);
+ grid.set_empty_tile(x + 1, self.start.1, TileType::Wall);
+ grid.set_empty_tile(x - 1, endy, TileType::Wall);
+ grid.set_empty_tile(x, endy, TileType::Wall);
+ grid.set_empty_tile(x + 1, endy, TileType::Wall);
}
fn tile_horizontal(&self, grid: &mut TileGrid) {
@@ -181,6 +188,13 @@ impl Corridor {
grid.set_tile(x, y, TileType::Floor);
grid.set_empty_tile(x, y + 1, TileType::Wall);
}
+ // Wall ends
+ grid.set_empty_tile(self.start.0, y - 1, TileType::Wall);
+ grid.set_empty_tile(self.start.0, y, TileType::Wall);
+ grid.set_empty_tile(self.start.0, y + 1, TileType::Wall);
+ grid.set_empty_tile(endx, y - 1, TileType::Wall);
+ grid.set_empty_tile(endx, y, TileType::Wall);
+ grid.set_empty_tile(endx, y + 1, TileType::Wall);
}
}