Answered step by step
Verified Expert Solution
Link Copied!

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.

  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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Combinatorial Testing In Cloud Computing

Authors: Wei-Tek Tsai ,Guanqiu Qi

1st Edition

9811044805, 978-9811044809

More Books

Students also viewed these Programming questions