Classic snake game in javascript following Max Wihlborg's tutorial.