Racer (Part 16/28)

  • 3
  • Locked
Currently, the player's car continues to move after colliding with an obstacle. In this part of the project, we'll implement a method that will check whether the car has hit an obstacle. When implementing this method, use the GameObject class's isCollision(GameObject) method, which we have implemen
You can't complete this task, because you're not signed in.
Comments (1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 38 , Greenfield, USA, United States
27 November 2021, 15:14
The checkCrash method is a little ambiguous. When iterating through the items list, playerCar.isCollision(item) should be identical in result with item.isCollision(playerCar) according to how the isCollision method works. However, the validation will only accept the latter variant.