The classic snake game in JavaScript with a little polish