Question: Need to code text-based game in Python-3 . Basically, it's intended to be monster-based -- I've sorted my theme and everything, but I made it

Need to code text-based game in Python-3. Basically, it's intended to be monster-based -- I've sorted my theme and everything, but I made it more simplistic on the map / dictionary.

Dictionary:

rooms = { 'Room 1' : { 'East' : 'Room 2', }, 'Room 2' : { 'North' : 'Room 3', 'South' : 'Room 7', 'East' : 'Room 5', 'West' : 'Room 1', 'item' : 'item 1' }, 'Room 3' : { 'East' : 'Room 4', 'item' : 'item 2' }, 'Room 4' : { 'West' : 'Room 3', 'item' : 'item 3' }, 'Room 5': { 'North': 'Room 6', 'West': 'Room 2', 'item': item 4}, 'Room 6' : { 'South' : 'Room 5', 'item' : 'item 5'}, 'Room 7' : {'North': 'Room 2', 'East' : 'Room 8, 'item': 'item 6' } }Need to code text-based game in Python-3. Basically, it's intended to be

The guidelines include developing functions using Python script, specifically to show different directional commands, identify room status, show inventory list, and display item in room. Likewise, a main function needs to be created. This game requires a continous loop until game is won or lost--developing calls to the functions created to show player's status and potential commands. I'll include an example of how I've been guiding myself (honestly just can't get anything to work regardless).

Sample Loop:

 You are in the Bedroom Inventory: [] You see a Pillow ---------------------- Enter your move: 

As the player collects items and moves between rooms, the status function should update accordingly. Here is another example after a player has collected items from two different rooms:

 You are in the Master Bedroom Inventory: [Pillow] -------------- Enter your move:

And then sample output:

 Congratulations! You have collected all items and won the pillow fight!. 

If the player loses the game, they will see the following output:

 SMACK! The pillow put you right to sleep. Start over? 

Thanks for your help in advance.

East Room 4 Room 3 (item) (item) West North South Room 6 (item) East Room 1 (start) Room 2 (item) North South West East Room 5 (item) West North South East Room 7 Room 8 (item) (item) West

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!