Text Adventure in javascript