fixbug: Werewolf game has ended, but the team is still running idle

This commit is contained in:
yingfeng 2024-07-19 18:43:24 +08:00
parent a3699128d1
commit dd8ff37c42

View file

@ -126,6 +126,9 @@ class Team(BaseModel):
self.run_project(idea=idea, send_to=send_to)
while n_round > 0:
if self.env.is_idle:
logger.debug("All roles are idle.")
break
n_round -= 1
self._check_balance()
await self.env.run()