diff options
Diffstat (limited to 'src/state.rs')
-rw-r--r-- | src/state.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/state.rs b/src/state.rs index f2ec249..8d0b164 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,7 +1,7 @@ use pancurses::Window; use std::env; -use crate::entities::{Character, Entity}; +use crate::entities::{Character, Entity, Render}; use crate::world::{Dungeon, Generatable, Level}; pub struct State { @@ -27,19 +27,14 @@ impl State { self.player.place(self.current_level().get_start_point()); } - pub fn debug(&self) { - match env::var("DEBUG") { - Ok(_) => { - self.dungeon.debug_levels(); - }, - Err(_) => () - }; - } - pub fn render_level(&self, window: &Window) { self.current_level().render(window); } + pub fn show_character(&self, window: &Window) { + self.character.render(window); + } + fn current_level(&self) -> &Level { &self.dungeon.levels[self.level] } |