Section - In and Out
A room can be indoorsy or outdoorsy. A room is usually outdoorsy.
Definition: a room is outward:
if it is indoorsy and the location is outdoorsy then no;
if it is outdoorsy and the location is indoorsy then yes;
if the number of rooms adjacent to it is greater than the number of rooms adjacent to the location then yes;
otherwise no.
Definition: a room is inward:
if it is outdoorsy and the location is indoorsy then no;
if it is indoorsy and the location is outdoorsy then yes;
if the number of rooms adjacent to it is less than the number of rooms adjacent to the location then yes;
otherwise no.
Check going nowhere when the noun is outside: try exiting instead.
Check exiting when the player is in a room (this is the guessing which way is out rule):
if at least one adjacent room is outward begin;
head to a random adjacent outward room;
do nothing instead;
otherwise;
say "I'm not sure which way you mean. [exits]." instead;
end if.
Check going inside when the room inside from the location is not a room and at least one adjacent room is inward (this is the guessing which way is in rule):
if more than one adjacent room is inward begin;
say "I'm not sure which way you mean. [exits]." instead;
otherwise;
head to a random adjacent inward room;
do nothing instead;
end if.