MCPcopy Create free account
hub / github.com/ActiveState/code / CreateEnemy4

Function CreateEnemy4

recipes/Python/580636_Space_Assault/recipe-580636.py:499–516  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

497 created3 = 1
498
499 def CreateEnemy4():
500 global Xpos
501 global Ypos
502 global en4Xpos
503 global en4Ypos
504 global created4
505 en4Xpos = random.randrange(0,33)*25
506 en4Ypos = random.randrange(0,27)*25
507 while abs(Xpos - en4Xpos) <= 150 and abs(Ypos - en4Ypos) <= 150:
508 en4Xpos = random.randrange(0,33)*25
509 en4Ypos = random.randrange(0,27)*25
510 self.enemy4 = Canvas(self,bg="black",highlightthickness=0,width=30,height=30)
511 self.enemy4.place(x=en4Xpos,y=en4Ypos)
512 self.enemy4.create_polygon(15,0,5,15,12,15,5,30,25,30,17,15,25,15,fill="darkgreen")
513 Enemies4.append(self.enemy4)
514 Enemies4Xpos.append(en4Xpos)
515 Enemies4Ypos.append(en4Ypos)
516 created4 = 1
517
518 def CreateEnemy5():
519 global Xpos

Callers

nothing calls this directly

Calls 2

placeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected