Simple adventure game in Java Script