Open eriktorbjorn opened 4 years ago
Similarly, the CRUMBS-GONE?
routine will only work if you are carrying the bag of crumbs, even though it's clearly meant to work if you are carrying the empty or soggy bag as well:
<ROUTINE CRUMBS-GONE? ()
<COND (<NOT <SAID-CRUMBS?>>
<RFALSE>)
(<PRSO? BAG>
<TAKE-CRUMBS>
<RTRUE>)
(<PRSO? EBAG SOGGY>
<TELL "The crumbs are all gone." CR>
<RTRUE>)>
<RFALSE>>
This routine is called from:
PRE-GIVE
PRE-PUT
PRE-THROW
PRE-TAKE
The SAID-CRUMBS?
routine is called from:
GWIM
, where it already checks if you mean the BAG
object.BAG-F
, so that should already be the BAG
object.EBAG-F
, as described above.CRUMBS-GONE?
, as described above.So I guess it should be safe to remove that check from SAID-CRUMBS?
? Or did I miss something?
EBAG-F
has this, which is apparently there to check if you refer to the empty (or soggy) bag as "crumbs":But it doesn't work. Probably because the first thing
SAID-CRUMBS?
does is to check if you're carrying the full bag of crumbs (BAG
):