diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/main.rs b/src/main.rs index 08e1b25..9f5e45b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,16 +4,14 @@ extern crate pancurses; #[macro_use] extern crate text_io; -mod character; -mod computer; +mod entities; mod world; +mod tiling; -use std::env; -use character::Player; -use character::Character; -use computer::Enemy; +use entities::{Character, Player, Entity}; use pancurses::{Window, initscr, endwin, Input, noecho}; -use world::{Dungeon, Level, Generable, TileType}; +use world::{Dungeon, Level, Generatable}; +use tiling::TileType; fn tile_to_str(tile: &TileType) -> &str { match tile { @@ -42,18 +40,6 @@ fn render_level(window: &Window, level: &Level) { } } -fn debug_level(level: Level) { - let grid = level.to_tilegrid().unwrap(); - - for line in grid.raw_data().iter() { - for block in line.iter() { - print!("{}", tile_to_str(block)); - } - print!("\n"); - } -} - - fn main() { let window = initscr(); let mut level = 0; |