From 6db983fca20d17db4887fdc220e17e8089336e7d Mon Sep 17 00:00:00 2001 From: Andrea Piombo Date: Sun, 30 Jul 2023 12:41:06 +0200 Subject: [PATCH] Update python Space Invader game.py Updated comparison of literals using "==" instead of "is" --- python Space Invader game.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python Space Invader game.py b/python Space Invader game.py index ae7748f4811..2d07677f67e 100644 --- a/python Space Invader game.py +++ b/python Space Invader game.py @@ -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