Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 2 : Haunted House Requirements The figure below is called a graph. The circle are called nodes and the lines are called edges. An
Part : 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.
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