MS 1: Short descriptions

The Adventure game would be tedious to play–particularly when output devices were as slow as they were in the 1970s–if the program always gave the full description of the room every time you entered it. Crowther’s game introduced the idea of short descriptions, which were one-line descriptions for rooms that the player has already visited. The long description appears the first time a room is entered or when the player types LOOK, and the short description appears thereafter.

Your job in this milestone is to implement this feature in your program. You presumably already implemented the get_short_description method in the AdvRoom class, but you need to add two new methods to AdvRoom to keep track of whether the room has been visited and change the code in AdvGame so that it checks for that condition and prints out the short description for rooms the player has already seen. The new methods in the AdvRoom class are set_visited and has_been_visited. The first takes a boolean value and stores that as a room attribute indicating whether the room has been visited. The second is just a getter method that returns the value of that attribute.

Once you have added these methods, you can add to and tweak your run method in AdvGame to set the visited state of each room as the player encounters it. And before displaying any description, you can check the visited state of the room to see whether the short or long description should be displayed. Once you have accomplished this, your program should be able to generate the following sample run:

Note that the player sees the short description after returning to the initial room.