summaryrefslogtreecommitdiff
path: root/server/bot/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-13 14:50:10 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-13 16:03:38 +0200
commit0f94e292bde8b9614aa48a6ba87f1a8d927b8133 (patch)
treefd8bb8c3d38c4b668c46b3b8d8a2b40e99ce2b97 /server/bot/src/lib.rs
parenta8376aab4159a449a205de3ed7fdcaa5f6ca6369 (diff)
downloadhurrycurry-0f94e292bde8b9614aa48a6ba87f1a8d927b8133.tar
hurrycurry-0f94e292bde8b9614aa48a6ba87f1a8d927b8133.tar.bz2
hurrycurry-0f94e292bde8b9614aa48a6ba87f1a8d927b8133.tar.zst
replace customers with bots and refactor some more server code.
Diffstat (limited to 'server/bot/src/lib.rs')
-rw-r--r--server/bot/src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/bot/src/lib.rs b/server/bot/src/lib.rs
index 385e2334..543a1062 100644
--- a/server/bot/src/lib.rs
+++ b/server/bot/src/lib.rs
@@ -30,7 +30,10 @@ pub struct BotInput {
pub direction: Vec2,
pub boost: bool,
pub interact: Option<IVec2>,
+ pub leave: bool,
}
+
+pub type DynBotAlgo = Box<dyn BotAlgo + Send + Sync + 'static>;
pub trait BotAlgo {
fn tick(&mut self, me: PlayerID, game: &Game, dt: f32) -> BotInput;
}