Comp 372 Program 5 - Dordal - Due Dec 10 (or later) You are to extend the CLOS version of the game program described in class in the following ways. All new verbs should be at least recognized in every room. All new puzzles should at least be plausible. Note that CLOS does not require you to define a new class to create a special room; you can simply provide room-specific versions of defmethod. 1. Add a second lantern or other Lightable. It may have either the same pname ("LANTERN") or a new pname (TORCH/FLASHLIGHT). 2. Introduce a puzzle room where you cannot *leave* the room until some action occurs. Possibilities are: You have to FIGHT the dragon (with a SWORD?) You have to GIVE the dragon a PRESENT or COOKIE. There is a cave-in and you have to DIG (with SHOVEL?) Optional extension: You cannot leave a SET of rooms until you complete the FIGHT/GIFT/whatever. 3. Implement the STONEROOM scenario following: You have entered a large room in the cave A heavy stone lies on the middle of the floor It looks like it would be difficult, but not impossible, to move it. > inventory You have the following things: cookie > move stone you are too weak and hungry to move the stone. > eat cookie boy! that made you feel stronger! > move stone infused with a sudden rush of extraordinary strength, you are able to move the stone easily. A moneybag is revealed. > inventory You don't have anything. > take moneybag You have picked up the moneybag In the version above, EAT COOKIE makes the cookie go away. The penalty for not having the cookie go away is negligible. You will have to have a STONEROOM-specific version of INTERPRET for MOVE. Also TAKE, because you don't want people to be able to TAKE MONEYBAG until after the stone is moved. (Alternatively, you can have MOVE STONE *create* the moneybag in the room at that point.) You probably should create a class EATABLE derived from CARRYABLE, to represent foods (though this isn't absolutely necessary). Optional: the cookie should last 2-3 bites. Keep the number of bites left as an attribute of the EATABLE class itself. You can substitute another food item (eg CHOCOLATE) if you wish. 4. You are to add one additional puzzle of your own. Your puzzle should, at a minimum, involve the following: one new CARRYABLE one new verb one new derived room class, with special behavior for at least one verb (new or existing). some kind of state change to the room or to an object (like the stone being moved or valve being turned) Here are a few possibilities. UNLOCK CHEST with a KEY found elsewhere; once the chest is unlocked, something should be inside. Cross a rickety two-move bridge over a bottomless pit; if you carry too much the bridge will break; you can only carry two things at a time. Have goblins attack you in a pitch-black cave room, if you fail to LIGHT LANTERN within 2 turns. Note that this puzzle involves keeping count of turns. You need to CAST SPELL in the WizardsChamber, but in order to do this you must first find in the game a BELL, BOOK, and CANDLE. (And maybe LIGHT CANDLE? Or maybe, in the simpler direction, just find NEWTEYE and BATWING. If you try to CAST SPELL and don't have the ingredients, the game should tell you what you're missing.)