A snake game written by javascript