summaryrefslogtreecommitdiff
path: root/server/src/entity/bot.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-13 13:25:14 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-13 16:03:38 +0200
commita8376aab4159a449a205de3ed7fdcaa5f6ca6369 (patch)
tree18683ebb64f9d41fb856d5e302f537785bb03f3d /server/src/entity/bot.rs
parent16ff78180669411326d42ea32d4a9260c018236c (diff)
downloadhurrycurry-a8376aab4159a449a205de3ed7fdcaa5f6ca6369.tar
hurrycurry-a8376aab4159a449a205de3ed7fdcaa5f6ca6369.tar.bz2
hurrycurry-a8376aab4159a449a205de3ed7fdcaa5f6ca6369.tar.zst
access entities as trait object
Diffstat (limited to 'server/src/entity/bot.rs')
-rw-r--r--server/src/entity/bot.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/src/entity/bot.rs b/server/src/entity/bot.rs
new file mode 100644
index 00000000..06477e8a
--- /dev/null
+++ b/server/src/entity/bot.rs
@@ -0,0 +1,13 @@
+use super::{EntityContext, Entity};
+use anyhow::Result;
+use hurrycurry_bot::BotAlgo;
+
+pub struct BotDriver {
+ algo: Box<dyn BotAlgo>,
+}
+
+impl Entity for BotDriver {
+ fn tick(&mut self, c: EntityContext<'_>) -> Result<()> {
+ Ok(())
+ }
+}