From 2e5f1363e6efff3daefee9fe6388be2332e6fb62 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Thu, 2 Nov 2017 05:51:32 -0500 Subject: -units now move respect impassable locations, syntax more uniform --- src/map.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/map.rs') diff --git a/src/map.rs b/src/map.rs index 0617042..c1e87a5 100644 --- a/src/map.rs +++ b/src/map.rs @@ -8,12 +8,12 @@ use pancurses::{newwin, ColorPair}; use character::Character; use location::Location; -pub struct Map{ - pub height : i32, - pub width : i32, - pub window : pancurses::Window, - map_data : Vec, - pub impassable :Vec, +pub struct Map { + pub height : i32, + pub width : i32, + pub window : pancurses::Window, + map_data : Vec, + pub impassable : Vec, } impl Map { @@ -22,7 +22,7 @@ impl Map { let reader = BufReader::new(file); let mut map_data = Vec::new(); - for line in reader.lines(){ + for line in reader.lines() { map_data.push(line.unwrap()); } @@ -50,11 +50,11 @@ impl Map { } Map { - height : height, - width : width, - window: newwin(height, width, 0, 0), - map_data: map_data, - impassable: impassable, + height : height, + width : width, + window : newwin(height, width, 0, 0), + map_data : map_data, + impassable : impassable, } } -- cgit v1.2.3