Snake (Part 17/20)

  • 3
  • Locked
  • Project task
At this stage, we have a bug — an apple can appear on top of the snake. To fix the bug, use our checkCollision(GameObject) method. The createNewApple() method must create a new apple (with new coordinates) in a loop until the call to the checkCollision(GameObject) method returns false. Let's also
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
9 August, 13:10
I'm failing the task with this error: The onKeyPress(Key) method must call the createGame() method if the passed argument is Key.SPACE and the game is stopped (isGameStopped == true). Be sure that the onKeyPress(Key) method calls the createGame() method if the SPACE bar was pressed and isGameStopped == true.