Question: 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.

  1. When we enter a room, we print out the room description. Be creative when you create the room descriptions.
  2. List the obvious exits, those that arent secret (marked with an S).
    1. Also, in-room 1, there are two entrances to that room that don't exit. They are one-way passages.
  3. In each room, process the four cardinal directions (North, South, East, and West) as input by the user.
    1. Allow the user to enter n or north, s or south, etc. to indicate the direction to move.
  4. 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

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 Programming Questions!