make size of levels variable
This commit is contained in:
@@ -6,6 +6,10 @@ use rand::Rng;
|
||||
use crate::artifacts::Artifact;
|
||||
#[cfg(test)]
|
||||
use crate::artifacts::{Chest, Potion};
|
||||
use crate::level_generator::ROOMS_HORIZONTAL;
|
||||
use crate::level_generator::ROOMS_VERTICAL;
|
||||
use crate::level_generator::ROOM_HEIGHT;
|
||||
use crate::level_generator::ROOM_WIDTH;
|
||||
use crate::monster::Monster;
|
||||
#[cfg(test)]
|
||||
use crate::monster::{Orc, Rat};
|
||||
@@ -13,8 +17,8 @@ use crate::player::Player;
|
||||
use crate::position::HasPosition;
|
||||
use crate::position::Position;
|
||||
|
||||
pub const LEVEL_WIDTH: usize = 50;
|
||||
pub const LEVEL_HEIGHT: usize = 25;
|
||||
pub const LEVEL_WIDTH: usize = 1 + ROOMS_VERTICAL * ROOM_WIDTH;
|
||||
pub const LEVEL_HEIGHT: usize = 1 + ROOMS_HORIZONTAL * ROOM_HEIGHT;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub enum StructureElement {
|
||||
|
||||
Reference in New Issue
Block a user