Question: This is the problem but the existing solutions provided by you dont work Part 2 : Haunted House Requirements The figure below is called a

This is the problem but the existing solutions provided by you dont work
Part 2: Haunted House Requirements
The figure below is called a graph. The circle are called nodes and the lines are called edges. An edge connects two nodes. You can interpret the graph as a haunted house containing rooms and passages between rooms. The nodes can be thought of as rooms, and an edge connects one room to another. Note that each node could have, at most, four edges.
Write a program that implements the haunted house using references to instances of a Node class. Each node in the graph will correspond to an instance of Node. The edges correspond to links that connect one node to another and can be represented in Node as instance variables that reference another Node class. Start the user in node A. The user's goal is to get to the exit in node L. The program should output possible moves in the north, south, east, or west direction.
Select the Suitor.
Escape the Haunted House.
Sentiment Analysis.
Q. Quit.
Your option =>2
Escape the Haunted House.
You are in room A of the Haunted House. You can go east or south.
N
You can't go in that direction!
You are in room A of the Haunted House. You can go east or south.
E
You are in room B of the Haunted House. You can go west, south or east.
S
You are in room F of the Haunted House. You can go north or east.
.
.
You are in room L of the Haunted House. You made it out alive!
This is the problem but the existing solutions

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!