diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-10-25 15:20:19 -0400 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-10-25 15:20:19 -0400 |
| commit | 54eac2384f2d449289dc0b91e9ec8538fe9d3847 (patch) | |
| tree | 97afb285016b35e6d4367b24782c1a941b76b05a /dungeon/src | |
| parent | graphics: have tilemap a consistent size and scale (diff) | |
| download | DungeonCrawl-54eac2384f2d449289dc0b91e9ec8538fe9d3847.tar.gz DungeonCrawl-54eac2384f2d449289dc0b91e9ec8538fe9d3847.tar.bz2 DungeonCrawl-54eac2384f2d449289dc0b91e9ec8538fe9d3847.zip | |
graphics: use atlas texture when rendering (and lots of refactoring)
Diffstat (limited to 'dungeon/src')
| -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 { |