Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a self.world.ship is None bug.

  • Loading branch information...
commit 70f7b17855f9213952f6db49300e3c3cf2292fea 1 parent 4348aba
@asweigart authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 square-shooter/square-shooter_makeover.py
View
4 square-shooter/square-shooter_makeover.py
@@ -354,7 +354,7 @@ def update(self, delta_t):
def handle_collisions(self, delta_t):
for b in self.bubbles:
- if self.bullet != None and b.collides_with(self.bullet):
+ if self.bullet != None and self.bullet.collides_with(b):
self.bubbles.remove(b)
if self.ship != None and not self.ship.has_super_bullets():
self.bullet = None
@@ -553,7 +553,7 @@ def render_bullet(self):
RED,
scale_and_round(pos.x, pos.y),
int(round(bullet.radius * MAP_SIZE)))
- if self.world.ship.has_super_bullets():
+ if self.world.ship != None and self.world.ship.has_super_bullets():
pygame.draw.rect(self.screen, RED, bbox, 1)
def render_powerup(self, powerup):

0 comments on commit 70f7b17

Please sign in to comment.
Something went wrong with that request. Please try again.