From fb393fc3f49a875ad73932cc5e6082e68fdd17f2 Mon Sep 17 00:00:00 2001 From: rilysh Date: Fri, 14 Oct 2022 00:34:37 +0700 Subject: [PATCH] fix: equal qualify issue in python3 --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index f3df86ee..ad1c3a08 100644 --- a/main.py +++ b/main.py @@ -118,7 +118,7 @@ def isCollision(enemyX, enemyY, bulletX, bulletY): if event.key == pygame.K_RIGHT: playerX_change = 5 if event.key == pygame.K_SPACE: - if bullet_state is "ready": + if bullet_state == "ready": bulletSound = mixer.Sound("laser.wav") bulletSound.play() # Get the current x cordinate of the spaceship @@ -174,7 +174,7 @@ def isCollision(enemyX, enemyY, bulletX, bulletY): bulletY = 480 bullet_state = "ready" - if bullet_state is "fire": + if bullet_state == "fire": fire_bullet(bulletX, bulletY) bulletY -= bulletY_change