a javascript version of the snake game