| ANSWER TO EXERCISE 50 | |
|
Use the invent routine to signal to short_name and article routines to change their usual habits:
invent
[; if (inventory_stage==1) give self general;
else give self ~general;
],
short_name
[; if (self has general) { print "box"; rtrue; } ],
article
[; if (self has general) { print "that hateful"; rtrue; }
else print "a"; ],
|