summaryrefslogtreecommitdiff
path: root/src/list.rs
diff options
context:
space:
mode:
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());