diff --git a/src/world/intention.rs b/src/world/intention.rs index b48f4b9..dfd8156 100644 --- a/src/world/intention.rs +++ b/src/world/intention.rs @@ -4,8 +4,8 @@ #[derive(Clone)] pub enum Intention { - MoveTo, - StakedOut, + MoveTo((i32, i32)), + StakedOut((i32, i32)), } #[derive(Clone)] diff --git a/src/world/mod.rs b/src/world/mod.rs index e9eae17..941a7a8 100644 --- a/src/world/mod.rs +++ b/src/world/mod.rs @@ -86,5 +86,18 @@ impl World { } } } + let mut global_it: Vec> = Vec::new(); + for i in 0..self.agents.len() { + if let Some(ag) = self.agents.get(i) { + global_it.push(LinkIntention { + it: Intention::MoveTo(ag.wolk_a()), + lin: i, + }); + global_it.push(LinkIntention { + it: Intention::StakedOut(ag.get_pos()), + lin: i, + }); + } + } } }