summaryrefslogtreecommitdiff
path: root/src/list.rs
diff options
context:
space:
mode:
authorTom Barrett <tombarrett@siu.edu>2017-11-23 04:35:03 -0600
committerTom Barrett <tombarrett@siu.edu>2017-11-23 04:35:03 -0600
commitaed9ad18c72c016da7894328710e9996c5629c0a (patch)
treebac1f73fef4845ea7729801f085aa599120f5abd /src/list.rs
parent72ea9deb1cf959602a038e5141a86228186a35b3 (diff)
-added giving a destination to units
Diffstat (limited to 'src/list.rs')
-rw-r--r--src/list.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/list.rs b/src/list.rs
index a429ab2..c22c229 100644
--- a/src/list.rs
+++ b/src/list.rs
@@ -34,6 +34,12 @@ impl List {
}
}
+ pub fn give_destination(&mut self, destination : Location) {
+ for i in 0..self.men.len() {
+ self.men[i].give_destination(destination)
+ }
+ }
+
fn get_free_locations(&mut self, location : Location) -> Vec<(Location, usize)> {
let mut potential_locations = location.neighbours(Vec::new());