From 763b047c92a5d5340bad38506862ad6c87ecdbe9 Mon Sep 17 00:00:00 2001 From: alf9310 Date: Thu, 6 Nov 2025 12:20:57 -0500 Subject: Light bsp refactoring --- dungeon/src/bsp.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'dungeon/src/bsp.rs') diff --git a/dungeon/src/bsp.rs b/dungeon/src/bsp.rs index be0f282..4c72389 100644 --- a/dungeon/src/bsp.rs +++ b/dungeon/src/bsp.rs @@ -397,10 +397,11 @@ pub fn generate(seed: u64) -> (Box<[Tile; TILE_COUNT]>, Pos) { (tiles_box, player_start) } -/// Tests +/// BSP Unit Tests #[cfg(test)] mod tests { use super::*; + use crate::map::MAP_SIZE; #[test] fn test_rect_center() { @@ -469,7 +470,7 @@ mod tests { let air_count = tiles.iter().filter(|&&t| t == Tile::Air).count(); assert!(air_count > 0); // Check that player_start is within bounds - assert!(player_start.xy().0 < MAP_SIZE_USIZE as u16); - assert!(player_start.xy().1 < MAP_SIZE_USIZE as u16); + assert!(player_start.xy().0 < MAP_SIZE); + assert!(player_start.xy().1 < MAP_SIZE); } } -- cgit v1.2.3-freya