Cleanup
This commit is contained in:
parent
677acf771a
commit
ee1f11cd1f
@ -12,7 +12,7 @@ impl Game<'_> {
|
||||
pub fn new(p: &mut Player) -> Game {
|
||||
let mut v: Vec<Level> = Vec::with_capacity(LEVELS);
|
||||
for _ in 0..LEVELS {
|
||||
let mut l = Level::new();
|
||||
let l = Level::new();
|
||||
v.push(l);
|
||||
}
|
||||
Game {
|
||||
|
@ -5,7 +5,7 @@ pub const LEVEL_WIDTH: usize = 50;
|
||||
pub const LEVEL_HEIGHT: usize = 25;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
enum StructureElement {
|
||||
pub enum StructureElement {
|
||||
Wall,
|
||||
Floor,
|
||||
StairDown,
|
||||
@ -13,7 +13,7 @@ enum StructureElement {
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct Level {
|
||||
structure: [[StructureElement; LEVEL_HEIGHT]; LEVEL_WIDTH],
|
||||
discovered: [[bool; LEVEL_HEIGHT]; LEVEL_WIDTH],
|
||||
|
@ -1,5 +1,4 @@
|
||||
use crate::game::Game;
|
||||
use crate::level::Level;
|
||||
use crate::player::Player;
|
||||
|
||||
mod game;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use std::cmp::{max, min};
|
||||
use std::cmp::max;
|
||||
|
||||
use crate::position::Position;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user