the-infocom-files / deadline

Deadline
4 stars 3 forks source link

The hidden closet mentions at most one exit in its description #50

Open eriktorbjorn opened 5 years ago

eriktorbjorn commented 5 years ago

At the start of this transcript, no door is open:

>LOOK
Hidden Closet
This is a secret room situated between the library and the master bedroom. The
room is bare and somewhat dusty, as if it were not often used. An unmarked
switchplate surrounds two buttons, one blue and one red. A formidable safe is
embedded in the south wall.

>PUSH BLUE BUTTON
The wall to the east swings open, revealing the master bedroom on the other
side.

>LOOK
Hidden Closet
This is a secret room situated between the library and the master bedroom. The
room is bare and somewhat dusty, as if it were not often used. An unmarked
switchplate surrounds two buttons, one blue and one red. A formidable safe is
embedded in the south wall.
The master bedroom can be seen through a door to the east.

>PUSH RED BUTTON
The wall to the west swings open, revealing the library on the other side.

>LOOK
Hidden Closet
This is a secret room situated between the library and the master bedroom. The
room is bare and somewhat dusty, as if it were not often used. An unmarked
switchplate surrounds two buttons, one blue and one red. A formidable safe is
embedded in the south wall.
The library can be seen through a door to the west.

It no longer mentions the exit to the east. That's because of this code in HIDDEN-CLOSET-F:

        <COND (<FSET? ,SAFE ,OPENBIT>
               <TELL " The heavy safe door is wide open.">)>
        <CRLF>
        <COND (<FSET? ,HIDDEN-DOOR-L ,OPENBIT>
               <TELL
"The library can be seen through a door to the west." CR>)
              (<FSET? ,HIDDEN-DOOR-B ,OPENBIT>
               <TELL
"The master bedroom can be seen through a door to the east." CR>)>
        <RTRUE>)>>

So the two cases are mutually exclusive. Instead, each message should have its own COND.