diff options
author | Luis Ferro <luis.ferro@eggplant.io> | 2019-11-12 16:07:29 +0100 |
---|---|---|
committer | Luis Ferro <luis.ferro@eggplant.io> | 2019-11-12 16:07:29 +0100 |
commit | 8b11578ed5d2b254c7b0f827170aadac6490434b (patch) | |
tree | 4dd84347c10919c29d873210f02cf96b86b3e240 /src/state.rs | |
parent | 44146c74c913a72f79f94280a5daa40f33e6c05b (diff) |
Rendering stuff
Diffstat (limited to 'src/state.rs')
-rw-r--r-- | src/state.rs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/state.rs b/src/state.rs index 6dad58e..1f50f1a 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,33 +27,12 @@ impl State { self.character.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); - - // window.mv(window.get_max_y() - 2, 0); - // window.clrtoeol(); - - // window.refresh(); - - // window.addstr(self.character.info() + "\n"); - - // window.mv(self.character.location.1 as i32,self.character.location.0 as i32); - // window.refresh(); - // draw_block(&window, self.character.tile_type); - // window.refresh(); } fn current_level(&self) -> &Level { |