Question
Write an application which implements this graph maze using reference to a Node class. Each node in the graph will correspond to an instance of
Write an application which implements this graph maze using reference to a Node class. Each node in the graph will correspond to an instance of the Node class. The edges correspond to the links that connect one node to another and can be represented in Node as an instance variable which references another Node class. Start the user in node A. The users goal is to finish in node L. The program should output possible moves in the cardinal directions.
Include a main method in a class called Maze which can be used to test this maze. Sample output can be shown as follows:
You are in room A of a maze of twisty little passages, all alike. You can go east or south.
E
You are in room B of a maze of twisty little passages, all alike. You can go west or south.
S
You are in room F of a maze of twisty little passages, all alike. You can go north or east.
E
Save your submissions in Maze.java and Node.java (Use Java programming language )
Consider the following graph with edges and vertices defined as follows: North Start LFinishStep 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