Question: 1. Write a Java program that solves a maze Maze is an exciting puzzle game whose goal is to find the path from a starting

1. Write a Java program that solves a maze Maze is an exciting puzzle game whose goal is to find the path from a starting position (S) to an end position (E ).

1. Write a Java program that solves a maze Maze is an

2. Important functions for the program

Reading a maze file

After reading a maze file, the program executes finding a path of the maze.

The format of a maze file is like the following:

exciting puzzle game whose goal is to find the path from a

- The number of rows : 8

- The number of columns : 8

- The map of the maze (# : wall, : the road, S: a starting point, E: an ending point

3. Finding the path from S to E on a given maze

After receiving information related to direction from a user, the program executes to find the path to the position E.

The command that a user provides to the program has the following format. - Direction r: rightward, l: leftward, u: upward, d:downward

- The number of movements: a positive integer.

- Example

r 3 : moves 3 columns to the right

u 2 : moves 2 rows upward

4. Iterative execution based on menu.

Once the program starts, it shows a menu showing 1) Read a maze file, 2) Show the current maze map, 3) Start the game, 4) Exit. If one game ends, the program repeats this process until a user chooses Exit.

starting position (S) to an end position (E ). 2. Important functions

for the program Reading a maze file After reading a maze file,

the program executes finding a path of the maze. The format of

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 Databases Questions!