Nuke hallway tile type

This commit is contained in:
Alex Bethel 2022-03-24 21:28:23 -06:00
parent 257f43f02a
commit 98cea211fc
2 changed files with 2 additions and 5 deletions

View file

@ -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 => '>',
}

View file

@ -243,7 +243,7 @@ fn add_hallways(grid: &mut Grid<DungeonTile>, 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;
}
}
}