Merge pull request #1406 from yingfeng2016/main

fixbug: Werewolf game has ended, but the team is still running idle
This commit is contained in:
Alexander Wu 2024-07-23 10:33:17 +08:00 committed by GitHub
commit c0abe17f63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()