@@ -216,7 +216,7 @@ async def test_botai_actions4(self):
216216 async def test_botai_actions5 (self ):
217217 # Test BotAI action: self.expand_now() which tests for get_next_expansion, select_build_worker, can_place, find_placement, build and can_afford
218218 # Wait till worker has started construction of CC
219- while 1 :
219+ while True :
220220 if self .can_afford (UnitTypeId .COMMANDCENTER ):
221221 await self .get_next_expansion ()
222222 await self .expand_now ()
@@ -241,9 +241,9 @@ async def test_botai_actions6(self):
241241 # Test if reaper grenade shows up in effects
242242 center = self .game_info .map_center
243243
244- while 1 :
244+ while True :
245245 if self .units (UnitTypeId .REAPER ).amount < 10 :
246- await self .client .debug_create_unit ([[ UnitTypeId .REAPER , 10 , center , 1 ] ])
246+ await self .client .debug_create_unit ([( UnitTypeId .REAPER , 10 , center , 1 ) ])
247247
248248 for reaper in self .units (UnitTypeId .REAPER ):
249249 reaper (AbilityId .KD8CHARGE_KD8CHARGE , center )
@@ -266,9 +266,9 @@ async def test_botai_actions6(self):
266266 async def test_botai_actions7 (self ):
267267 # Test ravager effects
268268 center = self .game_info .map_center
269- while 1 :
269+ while True :
270270 if self .units (UnitTypeId .RAVAGER ).amount < 10 :
271- await self .client .debug_create_unit ([[ UnitTypeId .RAVAGER , 10 , center , 1 ] ])
271+ await self .client .debug_create_unit ([( UnitTypeId .RAVAGER , 10 , center , 1 ) ])
272272 for ravager in self .units (UnitTypeId .RAVAGER ):
273273 ravager (AbilityId .EFFECT_CORROSIVEBILE , center )
274274
@@ -291,15 +291,15 @@ async def test_botai_actions8(self):
291291 # Test if train function works on hatchery, lair, hive
292292 center = self .game_info .map_center
293293 if not self .structures (UnitTypeId .HIVE ):
294- await self .client .debug_create_unit ([[ UnitTypeId .HIVE , 1 , center , 1 ] ])
294+ await self .client .debug_create_unit ([( UnitTypeId .HIVE , 1 , center , 1 ) ])
295295 if not self .structures (UnitTypeId .LAIR ):
296- await self .client .debug_create_unit ([[ UnitTypeId .LAIR , 1 , center , 1 ] ])
296+ await self .client .debug_create_unit ([( UnitTypeId .LAIR , 1 , center , 1 ) ])
297297 if not self .structures (UnitTypeId .HATCHERY ):
298- await self .client .debug_create_unit ([[ UnitTypeId .HATCHERY , 1 , center , 1 ] ])
298+ await self .client .debug_create_unit ([( UnitTypeId .HATCHERY , 1 , center , 1 ) ])
299299 if not self .structures (UnitTypeId .SPAWNINGPOOL ):
300- await self .client .debug_create_unit ([[ UnitTypeId .SPAWNINGPOOL , 1 , center , 1 ] ])
300+ await self .client .debug_create_unit ([( UnitTypeId .SPAWNINGPOOL , 1 , center , 1 ) ])
301301
302- while 1 :
302+ while True :
303303 townhalls = self .structures .of_type ({UnitTypeId .HIVE , UnitTypeId .LAIR , UnitTypeId .HATCHERY })
304304 if townhalls .amount == 3 and self .minerals >= 450 and not self .already_pending (UnitTypeId .QUEEN ):
305305 self .train (UnitTypeId .QUEEN , amount = 3 )
@@ -324,14 +324,14 @@ async def test_botai_actions9(self):
324324 center = self .game_info .map_center
325325 await self .client .debug_create_unit (
326326 [
327- [ UnitTypeId .HIGHTEMPLAR , 1 , center , 1 ] ,
328- [ UnitTypeId .DARKTEMPLAR , 1 , center + Point2 ((5 , 0 )), 1 ] ,
327+ ( UnitTypeId .HIGHTEMPLAR , 1 , center , 1 ) ,
328+ ( UnitTypeId .DARKTEMPLAR , 1 , center + Point2 ((5 , 0 )), 1 ) ,
329329 ]
330330 )
331331 await self ._advance_steps (4 )
332332 assert self .already_pending (UnitTypeId .ARCHON ) == 0
333333
334- while 1 :
334+ while True :
335335 for templar in self .units .of_type ({UnitTypeId .HIGHTEMPLAR , UnitTypeId .DARKTEMPLAR }):
336336 templar (AbilityId .MORPH_ARCHON )
337337
@@ -365,7 +365,7 @@ async def test_botai_actions10(self):
365365 center = self .game_info .map_center
366366
367367 target_amount = 400
368- while 1 :
368+ while True :
369369 bane_nests = self .structures (UnitTypeId .BANELINGNEST )
370370 lings = self .units (UnitTypeId .ZERGLING )
371371 banes = self .units (UnitTypeId .BANELING )
@@ -377,10 +377,10 @@ async def test_botai_actions10(self):
377377
378378 # Spawn units
379379 if not bane_nests :
380- await self .client .debug_create_unit ([[ UnitTypeId .BANELINGNEST , 1 , center , 1 ] ])
380+ await self .client .debug_create_unit ([( UnitTypeId .BANELINGNEST , 1 , center , 1 ) ])
381381 current_amount = banes .amount + bane_cocoons .amount + lings .amount
382382 if current_amount < target_amount :
383- await self .client .debug_create_unit ([[ UnitTypeId .ZERGLING , target_amount - current_amount , center , 1 ] ])
383+ await self .client .debug_create_unit ([( UnitTypeId .ZERGLING , target_amount - current_amount , center , 1 ) ])
384384
385385 if lings .amount >= target_amount and self .minerals >= 10_000 and self .vespene >= 10_000 :
386386 for ling in lings :
@@ -408,11 +408,11 @@ async def test_botai_actions11(self):
408408 map_center = self .game_info .map_center
409409
410410 while not self .units (UnitTypeId .RAVEN ):
411- await self .client .debug_create_unit ([[ UnitTypeId .RAVEN , 1 , map_center , 1 ] ])
411+ await self .client .debug_create_unit ([( UnitTypeId .RAVEN , 1 , map_center , 1 ) ])
412412 await self ._advance_steps (2 )
413413
414414 while not self .enemy_units (UnitTypeId .INFESTOR ):
415- await self .client .debug_create_unit ([[ UnitTypeId .INFESTOR , 1 , map_center , 2 ] ])
415+ await self .client .debug_create_unit ([( UnitTypeId .INFESTOR , 1 , map_center , 2 ) ])
416416 await self ._advance_steps (2 )
417417
418418 raven = self .units (UnitTypeId .RAVEN )[0 ]
@@ -421,7 +421,7 @@ async def test_botai_actions11(self):
421421 await self ._advance_steps (4 )
422422
423423 enemy = self .enemy_units (UnitTypeId .INFESTOR )[0 ]
424- while 1 :
424+ while True :
425425 raven = self .units (UnitTypeId .RAVEN )[0 ]
426426 raven (AbilityId .EFFECT_ANTIARMORMISSILE , enemy )
427427 await self ._advance_steps (2 )
@@ -440,7 +440,7 @@ async def test_botai_actions12(self):
440440 await self .client .debug_all_resources ()
441441 await self ._advance_steps (2 )
442442
443- while 1 :
443+ while True :
444444 # Once depot is under construction: debug kill scv -> advance simulation: should now match the test case
445445 if self .structures (UnitTypeId .SUPPLYDEPOT ).not_ready .amount == 1 :
446446 construction_scvs : Units = self .workers .filter (lambda worker : worker .is_constructing_scv )
0 commit comments