Comp 372 Programs 5&6 Nov 19, 1999 Dordal Due: Dec 5, 1999 You are to take the game program and make the following changes. Some of the changes are to the java version, and some are to the lisp version, which is why this assignment is considered two assignments. A few changes can be done to either version. The versions are available in H:\prof_pub\pld\372\game; the java version is in SimplCon.java and the lisp version is in adventure.cl 1. BOTH VERSIONS Complete the implementation of TURN VALVE in DamControlRoom so that until the valve is turned the room is too noisy for the TAKE command to work. Be sure your implementation does the following: (a)make sure TURN makes sense in *all* rooms (at least, the error message shouldn't be "I don't know how to TURN") (b)make sure the printed description on entry to the room describes the noise level of the room. (b) is done for you in the lisp version. 2. EITHER ONE VERSION OR THE OTHER Make the noise be in the DAM room, with the valve still in the DAMCONTROL room. Thus, one has to leave the DAM room to go to DAMCONTROLROOM to turn the valve, and then return to the DAM room to take the MONEYBAG ====================================== 3. BOTH VERSIONS Add one new puzzle room to each version. The puzzles can be more or less the same, if you wish. THey *should* depend for their function on new interpret/onentry/response behavior; they should *not* simply involve new descriptions. The puzzle should involve at least one new action (eg FIGHT TROLL, or UNLOCK CHEST, or DIG), and at least one new object (SWORD, or KEY, or SHOVEL) that has to be with you but that isn't initially in the room where the action takes place. Another idea is to have a room Darkroom, in which a bad thing happens to you if you don't have light for at least two turns. Your new rooms should involve at least one new verb (eg GIVE, FIGHT, UNLOCK, etc) ====================================== 4. EITHER ONE VERSION OR THE OTHER Implement the strategy of associating word default definitions with the verb objects. I will provide an outline file for the java way to do this, in which you create a class Verb, with a member function interpret(), and then derive new classes for each specific verb, each with a specific implementation of the interpret() function. To do this in lisp, you simply add the interpret function to the property list of the verb atom.