--- a/rust/lib-hwengine-future/src/ai/mod.rs Sun Oct 27 17:00:17 2024 +0100
+++ b/rust/lib-hwengine-future/src/ai/mod.rs Fri Nov 22 17:29:30 2024 +0100
@@ -1,6 +1,9 @@
+mod action;
+
use std::collections::HashMap;
use integral_geometry::Point;
use crate::GameField;
+use action::*;
pub struct Target {
point: Point,
@@ -19,18 +22,7 @@
game_field: &'a GameField,
targets: Vec<Target>,
team: Vec<Hedgehog>,
-}
-
-#[derive(Clone)]
-enum Direction {
- Left,
- Right
-}
-#[derive(Clone)]
-enum Action {
- Walk(Direction),
- LongJump,
- HighJump(usize)
+ planned_actions: Option<Actions>,
}
#[derive(Clone)]
@@ -63,6 +55,7 @@
game_field,
targets: vec![],
team: vec![],
+ planned_actions: None,
}
}
@@ -86,4 +79,8 @@
}
}
-}
\ No newline at end of file
+
+ pub fn have_plan(&self) -> bool {
+ self.planned_actions.is_some()
+ }
+}