From b23cdda680badc82149efac997840740213dbfbc Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 7 Oct 2025 12:01:47 -0400 Subject: add more default impls --- dungeon/src/map.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dungeon/src/map.rs') diff --git a/dungeon/src/map.rs b/dungeon/src/map.rs index b6f3356..cb602e8 100644 --- a/dungeon/src/map.rs +++ b/dungeon/src/map.rs @@ -190,8 +190,8 @@ impl Floor { impl Default for Floor { /// Returns a floor with a single set of walls on the map border fn default() -> Self { + const PLAYER_START: Pos = Pos::new_const::<1, 1>(); let mut tiles = Box::new([Tile::Air; TILE_COUNT]); - let player_start = Pos::new_const::<1, 1>(); let seed = 0u64; for pos in Pos::values() { @@ -202,7 +202,7 @@ impl Default for Floor { Self { tiles, - player_start, + player_start: PLAYER_START, seed, } } -- cgit v1.2.3-freya