work on level generation including tests

This commit is contained in:
2024-10-31 07:48:22 +01:00
parent c429784775
commit 50d98bfb4d
3 changed files with 312 additions and 82 deletions

View File

@@ -4,7 +4,7 @@ use crate::{monster::MonsterTypes, room::RoomType};
/// the number of rooms in vertical direction
pub const ROOMS_HORIZONAL: usize = 8;
pub const ROOMS_HORIZONTAL: usize = 8;
/// the number of rooms in horizontal direction
pub const ROOMS_VERTICAL: usize = 7;
@@ -25,7 +25,7 @@ pub const MIN_WIDTH: u16 = 120;
pub const MIN_HEIGHT: u16 = LEVEL_HEIGHT as u16;
/// the calculated width of a level
pub const LEVEL_WIDTH: usize = 1 + ROOMS_HORIZONAL * ROOM_WIDTH;
pub const LEVEL_WIDTH: usize = 1 + ROOMS_HORIZONTAL * ROOM_WIDTH;
/// the calculated height of a level
pub const LEVEL_HEIGHT: usize = 1 + ROOMS_VERTICAL * ROOM_HEIGHT;