ASSIGNMENT 5: The Snake Game DEPARTMENT AND COURSE NUMBER COMP 1010 6
Question 6: Add Levels [1 mark Add code so that when the last apple is eaten, anew level begins. Define ab void newLevel()
function that starts anew level. The snake should go back to
the top centre of the canvas, with only its head showing, moving down. Anew set of apples should appear.
The snake should move faster, start longer, and grow faster when it eats apples. There should be more apples. Experiment with your own set of values for these things. The
game should get more difficult, so that it becomes impossible before level 10 is reached, but the first few levels should not be too difficult.
[Programming Standards are worth 6 marks