1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
while inGame:
count = count +1
#------ displaying player ship
move(clavier()) # détection des controles
#--------- end
#----- displaying computers ships
if(Computer.loose == False):
if (count%170)==0:
Computer.moveAll(width)
screen.blit(background,backgroundRect)
for x in Computer.ships:
screen.blit(x.image, x.rect )
screen.blit(Comica.image, Comica.rect)
count = 1
#-------- end
#---- shooting display
if shooted == 1:
for x2 in shoots:
screen.blit(x2.image,x2.rect)
if ((x2.test == True) & ((count%25)==0)):
screen.blit(background, backgroundRect )
for x in Computer.ships:
screen.blit(x.image, x.rect )
screen.blit(Comica.image, Comica.rect)
x2.Continue(Computer)
elif(x2.test == False):
shoots.remove(x2)
#----------end
else:
#---- lost...
inGame = False
screen.blit(Computer.image, Computer.rect )
pygame.display.update() |
Partager