Skip to content

Commit 6db983f

Browse files
authored
Update python Space Invader game.py
Updated comparison of literals using "==" instead of "is"
1 parent d04ca9a commit 6db983f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python Space Invader game.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def iscollision(enemyx, enemyy, bulletx, bullety):
114114
playerx_change = 5
115115

116116
if (event.key == pygame.K_SPACE):
117-
if bullet_state is "ready":
117+
if bullet_state == "ready":
118118
bullet_sound = mixer.Sound('laser.wav')
119119
bullet_sound.play()
120120
bulletx = playerx

0 commit comments

Comments
 (0)