From 3c0ce13781240f52180c9846ed19c486499d4578 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 7 Oct 2025 13:27:13 -0400 Subject: add some functionality to Pos --- dungeon/src/map.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dungeon/src/map.rs') 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)] -- cgit v1.2.3-freya