From 98cea211fc5ee7bab0ed01cfaa4cdf551dd831f2 Mon Sep 17 00:00:00 2001 From: Alex Bethel Date: Thu, 24 Mar 2022 21:28:23 -0600 Subject: [PATCH] Nuke hallway tile type --- src/level.rs | 5 +---- src/rooms.rs | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/level.rs b/src/level.rs index 1082765..43a3c30 100644 --- a/src/level.rs +++ b/src/level.rs @@ -35,7 +35,6 @@ pub struct LevelExits { pub enum DungeonTile { Floor, Wall, - Hallway, Upstair, Downstair, } @@ -46,7 +45,6 @@ impl DungeonTile { pub fn is_floor(&self) -> bool { match self { DungeonTile::Wall => false, - DungeonTile::Hallway => false, _ => true, } } @@ -54,7 +52,7 @@ impl DungeonTile { /// Whether this tile can be traveled through by normal /// creatures. pub fn is_navigable(&self) -> bool { - self.is_floor() || self == &DungeonTile::Hallway + self.is_floor() } } @@ -160,7 +158,6 @@ impl DungeonLevel { ' ' } } - DungeonTile::Hallway => '#', DungeonTile::Upstair => '<', DungeonTile::Downstair => '>', } diff --git a/src/rooms.rs b/src/rooms.rs index f2295bf..ed477d7 100644 --- a/src/rooms.rs +++ b/src/rooms.rs @@ -243,7 +243,7 @@ fn add_hallways(grid: &mut Grid, rooms: &[RoomBounds], rng: &mut im for (x, y) in path { if grid[y][x] == DungeonTile::Wall { - grid[y][x] = DungeonTile::Hallway; + grid[y][x] = DungeonTile::Floor; } } }