diff options
Diffstat (limited to 'dungeon')
| -rw-r--r-- | dungeon/src/map.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dungeon/src/map.rs b/dungeon/src/map.rs index 24378a5..d185547 100644 --- a/dungeon/src/map.rs +++ b/dungeon/src/map.rs @@ -37,6 +37,11 @@ impl Tile { pub fn values() -> impl Iterator<Item = Self> { Self::iter() } + + /// Returns if the tile is a wall + pub fn is_wall(self) -> bool { + self == Self::Wall + } } impl Default for Tile { fn default() -> Self { |