summaryrefslogtreecommitdiff
path: root/server/bot/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/bot/src/lib.rs')
-rw-r--r--server/bot/src/lib.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/bot/src/lib.rs b/server/bot/src/lib.rs
new file mode 100644
index 00000000..e8f05fd6
--- /dev/null
+++ b/server/bot/src/lib.rs
@@ -0,0 +1,19 @@
+#![feature(isqrt)]
+pub mod algos;
+pub mod pathfinding;
+
+use hurrycurry_client_lib::Game;
+use hurrycurry_protocol::{
+ glam::{IVec2, Vec2},
+ PlayerID,
+};
+
+#[derive(Default, Clone, Copy)]
+pub struct BotInput {
+ pub direction: Vec2,
+ pub boost: bool,
+ pub interact: Option<IVec2>,
+}
+pub trait BotAlgo {
+ fn tick(&mut self, me: PlayerID, game: &Game, dt: f32) -> BotInput;
+}