summaryrefslogtreecommitdiff
path: root/src/list.rs
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@siu.edu>2017-11-24 07:34:07 -0600
committerTom Barrett <tombarrett@siu.edu>2017-11-24 07:34:07 -0600
commit86ddbbd163377bf8f50462e84d7dc6204c812367 (patch)
treee729fb49dd82098eb66d5427c87f3defbc372f36 /src/list.rs
parent6b152d1b551353ae58f38b046596eb8d0418f39b (diff)
-made men not public, made path just given
Diffstat (limited to 'src/list.rs')
-rw-r--r--src/list.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/list.rs b/src/list.rs
index 1383394..f9990b1 100644
--- a/src/list.rs
+++ b/src/list.rs
@@ -1,4 +1,5 @@
use std::thread::{spawn, JoinHandle};
+use std::slice::Iter;
extern crate pancurses;
@@ -10,7 +11,7 @@ use character::Character;
use constants::Colors;
pub struct List{
- pub men : Vec<Character>,
+ men : Vec<Character>,
impassable_locations : Vec<Location>,
threads : Vec<JoinHandle<(usize, Option<Vec<Location>>)>>
}
@@ -96,6 +97,10 @@ impl List {
}
}
+ pub fn get_men(&self) -> Iter<Character> {
+ self.men.iter()
+ }
+
fn get_free_locations(&mut self, location : Location) -> Vec<(Location, usize)> {
let mut potential_locations = location.neighbours(Vec::new());