diff options
author | Tom Barrett <tombarrett@siu.edu> | 2017-11-23 04:35:03 -0600 |
---|---|---|
committer | Tom Barrett <tombarrett@siu.edu> | 2017-11-23 04:35:03 -0600 |
commit | aed9ad18c72c016da7894328710e9996c5629c0a (patch) | |
tree | bac1f73fef4845ea7729801f085aa599120f5abd /src/list.rs | |
parent | 72ea9deb1cf959602a038e5141a86228186a35b3 (diff) |
-added giving a destination to units
Diffstat (limited to 'src/list.rs')
-rw-r--r-- | src/list.rs | 6 |
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()); |