From aed9ad18c72c016da7894328710e9996c5629c0a Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Thu, 23 Nov 2017 04:35:03 -0600 Subject: -added giving a destination to units --- src/list.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/list.rs') 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()); -- cgit v1.2.3