summaryrefslogtreecommitdiff
path: root/src/map.rs
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@siu.edu>2017-11-02 05:51:32 -0500
committerTom Barrett <tombarrett@siu.edu>2017-11-02 05:51:32 -0500
commit2e5f1363e6efff3daefee9fe6388be2332e6fb62 (patch)
treef0e255472120577d3b8699df9bda746b847ed730 /src/map.rs
parent5c495b75f25c324b5e468d0aa80d0699bb5f3fd2 (diff)
-units now move respect impassable locations, syntax more uniform
Diffstat (limited to 'src/map.rs')
-rw-r--r--src/map.rs24
1 files changed, 12 insertions, 12 deletions
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<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,
}
}