Question: Add another global variable for the player, called a hand. Make the hand initially empty. Change the description so that there is a key in

Add another global variable for the player, called a hand. Make the hand initially empty. Change the description so that there is a “key” in the Living Room. If the player types the command key while in the Living Room, the key gets put in the hand. Now, if the player has the key when entering the Kitchen, the stairs become accessible, allowing the player to go “west” and up the stairs. You will have to add some rooms to the game to make this work.

Step by Step Solution

3.32 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The variable to track whats in the players hand hand Empty This method prints out the description for the current rooms def showRoomroom printNow if room Porch showPorch elif room Entryway showEntrywa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Computing and Programming in Pytho Questions!