The classic snake game in JavaScript