Javascript implementation of the snake game.