Skip to content

Commit

Permalink
Update python Space Invader game.py
Browse files Browse the repository at this point in the history
Updated comparison of literals using "==" instead of "is"
  • Loading branch information
Piombacciaio authored Jul 30, 2023
1 parent d04ca9a commit 6db983f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python Space Invader game.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def iscollision(enemyx, enemyy, bulletx, bullety):
playerx_change = 5

if (event.key == pygame.K_SPACE):
if bullet_state is "ready":
if bullet_state == "ready":
bullet_sound = mixer.Sound('laser.wav')
bullet_sound.play()
bulletx = playerx
Expand Down

0 comments on commit 6db983f

Please sign in to comment.