Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN PYTHON***** Our game will consist of 4 rooms with several passages and two one-way secret passages. The map is below. When we first start
IN PYTHON*****
Our game will consist of 4 rooms with several passages and two one-way secret passages. The map is below.
When we first start the game, we will be in Room 1. In our design, we want each room to be a separate function separate from our main program.
This week we want to create the main program loop and the python functions for each room. Listed below are the requirements for this week.
- When we enter a room, we print out the room description. Be creative when you create the room descriptions.
- List the obvious exits, those that arent secret (marked with an S).
- Also, in-room 1, there are two entrances to that room that don't exit. They are one-way passages.
- In each room, process the four cardinal directions (North, South, East, and West) as input by the user.
- Allow the user to enter n or north, s or south, etc. to indicate the direction to move.
- The Python function for each room should return the value of the room they have moved to when it exits. For example, in room 1 the player types south. The Python function should exit and return the value 2 for room 2.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started