MCPcopy Index your code
hub / github.com/geekcomputers/Python / collide

Method collide

brickout-game/brickout-game.py:277–285  ·  view source on GitHub ↗

check collisions between the ball and any of the bricks.

(self, ball)

Source from the content-addressed store, hash-verified

275 return len(self._bricks) == 0
276
277 def collide(self, ball):
278 """
279 check collisions between the ball and
280 any of the bricks.
281 """
282 for brick in self._bricks:
283 if brick.collide(ball):
284 return True
285 return False
286
287
288# The game objects ball, paddle and brick wall

Callers

nothing calls this directly

Calls 1

collideMethod · 0.45

Tested by

no test coverage detected