Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplified the Bubble2D is_out() method.

  • Loading branch information...
commit ffde511d11d1b1ec1d244c02175d88bcfebb2de7 1 parent e5a7df0
@asweigart authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  square-shooter/square-shooter_makeover.py
View
2  square-shooter/square-shooter_makeover.py
@@ -100,7 +100,7 @@ def wrap_around(self):
def is_out(self):
"""Returns True if the center of the bubble is outside the game map, False if it is on the map."""
- return self.pos.x < 0 or self.pos.y < 0 or self.pos.x > 1 or self.pos.y > 1
+ return not (0 < self.pos.x < 1 and 0 < self.pos.y < 1)
def collides_with(self, bubble):
"""Returns True if this bubble is intersecting with the Bubble2D object passed in for the bubble parameter."""
Please sign in to comment.
Something went wrong with that request. Please try again.