diff options
author | Tom Barrett <tombarrett@siu.edu> | 2017-11-02 05:51:32 -0500 |
---|---|---|
committer | Tom Barrett <tombarrett@siu.edu> | 2017-11-02 05:51:32 -0500 |
commit | 2e5f1363e6efff3daefee9fe6388be2332e6fb62 (patch) | |
tree | f0e255472120577d3b8699df9bda746b847ed730 /src/map.rs | |
parent | 5c495b75f25c324b5e468d0aa80d0699bb5f3fd2 (diff) |
-units now move respect impassable locations, syntax more uniform
Diffstat (limited to 'src/map.rs')
-rw-r--r-- | src/map.rs | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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<String>, - pub impassable :Vec<Location>, +pub struct Map { + pub height : i32, + pub width : i32, + pub window : pancurses::Window, + map_data : Vec<String>, + pub impassable : Vec<Location>, } 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, } } |