diff options
Diffstat (limited to 'server/src/entity/bot.rs')
-rw-r--r-- | server/src/entity/bot.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/entity/bot.rs b/server/src/entity/bot.rs index 79ca97f1..6f39fab2 100644 --- a/server/src/entity/bot.rs +++ b/server/src/entity/bot.rs @@ -29,7 +29,7 @@ pub struct BotDriver<T> { join_data: Option<(String, i32)>, id: PlayerID, interacting: bool, - pub left: bool, + left: bool, } impl<T: BotAlgo> BotDriver<T> { @@ -44,6 +44,9 @@ impl<T: BotAlgo> BotDriver<T> { } } impl<T: BotAlgo> Entity for BotDriver<T> { + fn finished(&self) -> bool { + self.left + } fn tick(&mut self, c: EntityContext<'_>) -> Result<()> { if let Some((name, character)) = self.join_data.take() { self.id = PlayerID(random()); // TODO bad code, can collide |