Hardware Reference
In-Depth Information
CHALLENGE
Compare the code of AdventureGame2.py to AdventureGame1.py and
note the changes. Do you think refactoring the code was a good idea?
How can you add more locations to the code you have created so far for the
adventure game?
How many different times must you run the program to try all possible paths
through the code to make sure that it works?
Can you add the inventory list to the text adventure game so that the player can
make decisions about using objects?
FIGURE 5-13 he Python Adventure Game in action, using the newly deined
functions
Search WWH ::




Custom Search