checks collision between ball and bricks.
(self, ball)
| 256 | brick.draw() |
| 257 | |
| 258 | def update(self, ball): |
| 259 | """ |
| 260 | checks collision between ball and bricks. |
| 261 | """ |
| 262 | for i in range(len(self._bricks)): |
| 263 | if (self._bricks[i] != None) and self._bricks[i].collide(ball): |
| 264 | self._bricks[i] = None |
| 265 | |
| 266 | # removes the None-elements from the brick list. |
| 267 | for brick in self._bricks: |
| 268 | if brick is None: |
| 269 | self._bricks.remove(brick) |
| 270 | |
| 271 | def hasWin(self): |
| 272 | """ |