Section 1 - Room doors
A room-door is a kind of container. A room-door is always locked. A room-door is always proper-named and scenery. The description of a room-door is always "The doors are made of brown wood and are practically indistinguishable from each other.[if the item described is locked] This door is locked." A room-door is always in the Upstairs corridor.
Understand "doors" as a room-door.
Understand "room" as a room-door.
The plural of a room-door is notinuse. [1]
The door 101 is a room-door.
The door 102 is a room-door. The room key unlocks door 102.
The door 103 is a room-door.
The door 104 is a room-door.
The door 105 is a room-door.
The door 106 is a room-door.
The door 107 is a room-door.
The current door number is a number that varies. The current door number is 101.
Rule for printing the name of a room-door while asking which do you mean: [2]
if the current door number is 108:
now the current door number is 101;
say "door [current door number]";
increment the current door number.
Instead of opening a room-door when the door 102 is locked and the player is not carrying the room key for the first time:
say "The door seems to be locked. Brief testing confirms that the same is true for every door here."
Instead of entering a locked room-door:
try opening the noun.
Instead of entering an unlocked room-door:
try going inside.
Notes
[1]. Force disambiguation when the player refers to multiple doors.
[2]. This is a simple hack to get the room numbers in correct order when the parser asks which one the player means. Instead of trying to order the doors themselves, we'll just print the numbers consecutively regardless of what their actual name is.