Lesson 13

We've created an ate function that accepts a snake and the previous version of the snake. We can also think about passing the ate function other things, which we'll get into in a bit. In ate we also reuse the detectCollisionBetween to find out if there's a collision.

Now we just have to check if the newSnake ate it's previous self to see if there was a collision! We do this by calling the ate function inside of advanceGame.