WIP: All bots connect and run

Signed-off-by: Tyler Marques <me@tylermarques.com>
This commit is contained in:
Tyler Marques 2025-07-30 12:46:34 -07:00
parent 298c5df74a
commit 69aa40be31
No known key found for this signature in database
GPG key ID: CB99EDCF41D3016F
2 changed files with 31 additions and 67 deletions

View file

@ -49,6 +49,7 @@ async def main():
"""Main entry point with comprehensive error handling."""
bots = {}
args = parse_arguments()
bot_tasks = set()
if not args.game_id:
# No game id, lets create a new game.
@ -67,11 +68,10 @@ async def main():
)
for power, bot in bots.items():
try:
await bot.run()
logger.info(f"Bot {bot.power} started")
finally:
await bot.cleanup()
task = asyncio.create_task(bot.run())
bot_tasks.add(task)
logger.info(f"Bot_{bot.power_name} started")
await asyncio.gather(*bot_tasks)
else:
bot = SingleBotPlayer(