From 00c1c6af949ae50c2b061919a76ac5a0bb061791 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 12 Aug 2024 16:25:31 +0200 Subject: bot: make crate hybrid --- server/bot/src/lib.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 server/bot/src/lib.rs (limited to 'server/bot/src/lib.rs') 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, +} +pub trait BotAlgo { + fn tick(&mut self, me: PlayerID, game: &Game, dt: f32) -> BotInput; +} -- cgit v1.2.3-70-g09d2