Coding the detectCollisions method: Part 2