aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorLuis Ferro <luis.ferro@eggplant.io>2019-11-12 14:28:32 +0100
committerLuis Ferro <luis.ferro@eggplant.io>2019-11-12 14:28:32 +0100
commit857d7a8eccec2493163dbb1ae2f45a24a52f108c (patch)
tree5c6837e528b56d9f00dc637fdf1edb962e1b0987 /src/main.rs
parente7b227ed268e8570518f9d1452b5e7d0d0a0ee32 (diff)
parent8fa3fa881bc3b954e136295fe6cc7022737ae9db (diff)
Fix conflicts
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs24
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;