Classic snake game in JS