We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf2860e commit 6cd553dCopy full SHA for 6cd553d
Day2/answers/spaceinvaders.py
@@ -137,10 +137,11 @@ def isSpent(self):
137
138
keys = pygame.key.get_pressed()
139
if keys[pygame.K_RIGHT]:
140
- spaceship.moveRight()
+ spaceship.moveRight()
141
if keys[pygame.K_LEFT]:
142
- spaceship.moveLeft()
+ spaceship.moveLeft()
143
if keys[pygame.K_SPACE]:
144
+ if len(player_missiles) == 0:
145
spaceship.shoot()
146
147
screen.fill(black)
0 commit comments