Question: This method prints out the maze in a nice, readable format using the blocked, visited, player, start, and goal fields. You can see a sample

This method prints out the maze in a nice, readable format using the blocked, visited, player, start, and goal fields.
You can see a sample output in the easy_output.txt file in the data directory.
You will need to print the border like you see in the sample output. The corners are asterisks, the top is dashes, and the sides are pipes (vertical bars).
A spot with an X is blocked.
A spot with a space is open.
The starting location is an S
The goal location is a G
The player's location is an @
Any visited spot is a period.
The printMaze test should pass when you are done.
Hints
Use nested loops to go over the blocked array.
Use if statements to choose which character to print.
Consider where you need to print newlines.
Character priority:
@ for player
S and G for start and goal
Period for visited location
X for blocked location
Space for open, unvisited location

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!