Week 13: Mon, Nov 19 (pre-Thanksgiving) What has OOP gotten us in the Game? The remainder of game development is adding new context-specific extensions to respond(). It's easy to drop in new rooms. Program is response-driven; compare windows GUI Player version: Look at getShortDescription REFACTORING!! DustyRoom: fix getShortDescription() This is NOT refactoring! What if we wanted to have more rooms that interact, via data placed in the Player object? Need: Room1, Room2, & Player to coordinate extra fields. Eg: To defeat the Dragon in the DragonRoom, you must have a Spell attribute (not an invetory Item!!), that you can only earn in the MistyLake room. Exam: Problem 1 Book and BookPurchase2: why inheritance isn't the way. general discussion of how inheritance and IS-A is helping us here note that unlike DoME, there are lots of base-class instances (Room & Item), not just the derived-class instances IS-A rule Could-it-have-more-than-one rule versus containment ====================== Other possibilities: Simpler puzzles: bridge you can't cross unless total weight is small maze (can find way by dropping items) ============================================================================== Foxes & Rabbits basics of simulator long demo 1-2 rabbits demo: how rabbit.run() method works Demo of small window with breeding reduced to 0 Rabbit.run() note newLocation issue Fox hunt() Demo of small window with breeding reduced to 0 Note that adjacentLocations method of class Field returns an Iterator.