From 8b11578ed5d2b254c7b0f827170aadac6490434b Mon Sep 17 00:00:00 2001
From: Luis Ferro <luis.ferro@eggplant.io>
Date: Tue, 12 Nov 2019 16:07:29 +0100
Subject: Rendering stuff

---
 src/world.rs | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

(limited to 'src/world.rs')

diff --git a/src/world.rs b/src/world.rs
index 42e4d7c..15c77e4 100644
--- a/src/world.rs
+++ b/src/world.rs
@@ -1,7 +1,7 @@
 use rand::Rng;
 use pancurses::{Window};
 use crate::entities::{Entity};
-use crate::tiling::{TileGrid, Tileable, TileType};
+use crate::tiling::{TileGrid, Tileable, TileType, draw_block};
 
 pub type Point = (usize, usize);
 
@@ -187,23 +187,6 @@ impl Dungeon {
             levels: vec![]
         }
     }
-
-    pub fn debug_levels(&self) {
-        for l in &self.levels {
-            Dungeon::debug_level(l);
-        }
-    }
-
-    fn debug_level(level: &Level) {
-        let grid = level.to_tilegrid().unwrap();
-
-        for line in grid.raw_data().iter() {
-            for block in line.iter() {
-                print!("{}", Dungeon::tile_to_str(block));
-            }
-            print!("\n");
-        }
-    }
 }
 
 impl Generatable for Dungeon {
@@ -270,7 +253,7 @@ impl Level {
 
         for (linenum, line) in grid.raw_data().iter().enumerate() {
             for block in line.iter() {
-                Dungeon::draw_block(&window, &block);
+                draw_block(&window, &block);
             }
             window.mv(linenum as i32, 0);
         }
-- 
cgit v1.2.3