So the two messages have been swapped. Here is the code from TRAP-DOOR-FCN:
(<EQUAL? ,HERE ,CELLAR>
<COND (<AND <VERB? OPEN UNLOCK>
<NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
<TELL
"The door is locked from above." CR>)
(<AND <VERB? CLOSE> <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>>
<FCLEAR ,TRAP-DOOR ,TOUCHBIT>
<FCLEAR ,TRAP-DOOR ,OPENBIT>
<TELL "The door closes and locks." CR>)
(<VERB? OPEN CLOSE>
<TELL <PICK-ONE ,DUMMY> CR>)>)>>
It looks like a simple cut-and-paste error. When trying to open door, it checks that the door is closed with <NOT <FSET? ,TRAP-DOOR ,OPENBIT>>. When trying to close the door, it uses the exact same test to see if it's closed.
It should almost certainly be <AND <VERB? CLOSE> <FSET? ,TRAP-DOOR ,OPENBIT>> instead.
It looks like it was fixed in the 1987 version of Mini-Zork I.
If the trap door is closed:
If the trap door is closed:
So the two messages have been swapped. Here is the code from
TRAP-DOOR-FCN
:It looks like a simple cut-and-paste error. When trying to open door, it checks that the door is closed with
<NOT <FSET? ,TRAP-DOOR ,OPENBIT>>
. When trying to close the door, it uses the exact same test to see if it's closed.It should almost certainly be
<AND <VERB? CLOSE> <FSET? ,TRAP-DOOR ,OPENBIT>>
instead.It looks like it was fixed in the 1987 version of Mini-Zork I.