Extract constants and make monsters variable per level
This commit is contained in:
@@ -6,10 +6,8 @@ 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::constants::LEVEL_HEIGHT;
|
||||
use crate::constants::LEVEL_WIDTH;
|
||||
use crate::monster::Monster;
|
||||
#[cfg(test)]
|
||||
use crate::monster::{Orc, Rat};
|
||||
@@ -17,9 +15,6 @@ use crate::player::Player;
|
||||
use crate::position::HasPosition;
|
||||
use crate::position::Position;
|
||||
|
||||
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 {
|
||||
Start,
|
||||
|
||||
Reference in New Issue
Block a user