Comp 372 Program 4 - Dordal - Due April 14 You are to extend the game program described in class in the following ways. 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: chocolate > move stone you are too weak and hungry to move the stone. > eat chocolate 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 have the following things: chocolate > take moneybag You have picked up the moneybag Note that in the version above, EAT CHOCOLATE does not make the chocolate go away! It should (although this is not absolutely required). 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 chocolate should last 2-3 bites. Keep the number of bites left as an attribute of the chocolate itself. 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.)