import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer

class WorkerRushBot(sc2.BotAI):
    async def on_step(self, iteration):
        if iteration == 0:
            for worker in self.workers:
                await self.do(worker.attack(self.enemy_start_locations[0]))

def main():
    run_game(maps.get("Abyssal Reef LE"), [
        Bot(Race.Zerg, WorkerRushBot()),
        Computer(Race.Protoss, Difficulty.Medium)
    ], realtime=True)

if __name__ == '__main__':
    main()

@@ -1,15 +1,4 @@
-import sc2%0A
 from
@@ -41,16 +41,23 @@
 fficulty
+, BotAI
 %0Afrom sc
@@ -111,20 +111,16 @@
 Bot(
-sc2.
 BotAI):%0A
     
@@ -115,16 +115,94 @@
 BotAI):%0A
+    def __init__(self):%0A        super().__init__()%0A        self.actions = %5B%5D%0A%0A
     asyn
@@ -233,16 +233,43 @@
 ation):%0A
+        self.actions = %5B%5D%0A%0A
         
@@ -303,110 +303,190 @@
     
-for worker in self.workers:%0A                await self.do(worker.attack(self.enemy_start_loca
+target = self.enemy_start_locations%5B0%5D%0A%0A            for worker in self.workers:%0A                self.actions.append(worker.attack(target))%0A%0A        await self.do_actions(self.ac
 tions
-%5B0%5D)
 )%0A%0Ad

Use do_actions() instead of do() in WorkerRushBot