Factor out global variable
Refactor exit checking
Move current room and object to new game state object
Move more variables to game state object
Rename last global variable