changed next room function to return undefined if you can not go in a direction
modified addDoorCount function for clarity