check collisions between the ball and any of the bricks.
(self, ball)
| 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 |