summaryrefslogtreecommitdiff
path: root/dungeon/src/map.rs
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2025-10-07 13:27:13 -0400
committerFreya Murphy <freya@freyacat.org>2025-10-08 19:37:16 -0400
commit3c0ce13781240f52180c9846ed19c486499d4578 (patch)
tree4b866bac36743192d182aa9fe53b9aa70a6d3870 /dungeon/src/map.rs
parentProposal Template Created (diff)
downloadDungeonCrawl-3c0ce13781240f52180c9846ed19c486499d4578.tar.gz
DungeonCrawl-3c0ce13781240f52180c9846ed19c486499d4578.tar.bz2
DungeonCrawl-3c0ce13781240f52180c9846ed19c486499d4578.zip
add some functionality to Pos
Diffstat (limited to 'dungeon/src/map.rs')
-rw-r--r--dungeon/src/map.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/dungeon/src/map.rs b/dungeon/src/map.rs
index cb602e8..bb83ba9 100644
--- a/dungeon/src/map.rs
+++ b/dungeon/src/map.rs
@@ -6,8 +6,11 @@ use crate::pos::{Direction, Pos};
/// `MAP_SIZE` is the size of the size of the dungeon grid.
pub const MAP_SIZE: u16 = 100;
+/// `MAP_SIZE` as a usize
+pub const MAP_SIZE_USIZE: usize = MAP_SIZE as usize;
+
/// The number of tiles in the dungeon grid
-pub const TILE_COUNT: usize = MAP_SIZE as usize * MAP_SIZE as usize;
+pub const TILE_COUNT: usize = MAP_SIZE_USIZE * MAP_SIZE_USIZE;
/// The `EntityKind` represents what kind of entity this is.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]