Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I you will write an object-oriented program to explore a series of rooms in a video game. To begin, use the final exam module

I you will write an object-oriented program to explore a series of

I you will write an object-oriented program to explore a series of "rooms" in a video game. To begin, use the final exam module to set up the "rooms" by running the following code: starting_room - cs0002_final_exam_module.generate_maze() The variable 'starting_room' is an object of class "Room" with the following properties & methods: get monster() - A method that takes no arguments and returns the name of a monster that lives in this room (string) get_gold() - A method that takes no arguments and returns how much gold can be found in this room (integer) north - An instance variable that points to the room directly above this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. south - An instance variable that points to the room directly below this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. east - An instance variable that points to the room directly to the right of this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. west - An instance variable that points to the room directly to the left of this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. Here is a map of all of the rooms - note that the given variable "starting_room" is in the center of the map. Room1 Room4 Room6 Room2 Room7 Room10 Room11 Starting Room Room3 Room5 Room8 Room9 Room12 Your task is to answer the following question using the "starting_room" object described above:

Step by Step Solution

3.45 Rating (152 Votes )

There are 3 Steps involved in it

Step: 1

Answer Certainly Based on the description of the Room class and its propertiesmethods heres an examp... 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

Business Communication Essentials a skill based approach

Authors: Courtland L. Bovee, John V. Thill

6th edition

978-0132971324

More Books

Students also viewed these Programming questions