Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down