the-infocom-files / zork2

Zork II: The Wizard of Frobozz
8 stars 4 forks source link

You can't look in the hole in the safe if there are objects in it #55

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago
>LOOK IN HOLE
There is nothing in the hole.

>PUT BRICK IN HOLE
Done.

>LOOK
Dusty Room
You are in a dusty old room which is featureless, except for an exit on the
north side.
Imbedded in the far wall is a rusty box. It appears to be somewhat damaged,
since an oblong hole has been chipped out of the front of it.
The hole contains:
  A brick

>LOOK IN HOLE
You can't look inside a hole.

It is perhaps notable that SLOT has a holding capacity, but it does not have CONTBIT. Perhaps to prevent the player from opening or closing the hole?

SLOT-F only handles "LOOK-INSIDE" when the hole is empty:

     <COND (<AND <VERB? LOOK-INSIDE> <NOT <FIRST? ,SLOT>>>
        <TELL "There's nothing in the hole." CR>)

That can be fixed, of course, but is it the right way forward?