summaryrefslogtreecommitdiff
path: root/dungeon/src
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-10-25 15:20:19 -0400
committerFreya Murphy <freya@freyacat.org>2025-10-25 15:20:19 -0400
commit54eac2384f2d449289dc0b91e9ec8538fe9d3847 (patch)
tree97afb285016b35e6d4367b24782c1a941b76b05a /dungeon/src
parentgraphics: have tilemap a consistent size and scale (diff)
downloadDungeonCrawl-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.rs5
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 {