summaryrefslogtreecommitdiff
path: root/server/src/entity/bot.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-18 16:16:58 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-18 16:16:58 +0200
commit9d1c30cf9ef5a057c760da49b52312de4a5afc6a (patch)
treef6532fd40259f7e54d068a656f3aaecf98c22682 /server/src/entity/bot.rs
parentfb6ca2a4b9d78dd80dbdf37b2926d9ede4108e8b (diff)
downloadhurrycurry-9d1c30cf9ef5a057c760da49b52312de4a5afc6a.tar
hurrycurry-9d1c30cf9ef5a057c760da49b52312de4a5afc6a.tar.bz2
hurrycurry-9d1c30cf9ef5a057c760da49b52312de4a5afc6a.tar.zst
prevent multiple tutorials at once
Diffstat (limited to 'server/src/entity/bot.rs')
-rw-r--r--server/src/entity/bot.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/entity/bot.rs b/server/src/entity/bot.rs
index 6f39fab2..cd505c4f 100644
--- a/server/src/entity/bot.rs
+++ b/server/src/entity/bot.rs
@@ -21,6 +21,7 @@ use hurrycurry_bot::{BotAlgo, DynBotAlgo};
use hurrycurry_protocol::{PacketS, PlayerID};
use log::info;
use rand::random;
+use std::any::Any;
pub type DynBotDriver = BotDriver<DynBotAlgo>;
@@ -43,7 +44,7 @@ impl<T: BotAlgo> BotDriver<T> {
}
}
}
-impl<T: BotAlgo> Entity for BotDriver<T> {
+impl<T: BotAlgo + Any> Entity for BotDriver<T> {
fn finished(&self) -> bool {
self.left
}