Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE IMPORT FILE AND THE PROGRAM SHOULD READ A FILE; DONT JUST invent the maze or else i will thumbs down Traverse a maze recursively.

USE IMPORT FILE AND THE PROGRAM SHOULD READ A FILE; DONT JUST "invent the maze" or else i will thumbs down

image text in transcribed

image text in transcribed

Traverse a maze recursively. Your program MUST read from a file called "maze.dat". A sample maze has been provided. The actual maze will be larger. The start and end of the maze are represented with the characters + and -, respectively. The first line of the maze file will be the number of rows and columns, respectively. As your program moves through the maze the current path should also be marked with the + character. Any path leading to a dead end should be marked with the character. Upon reaching the end of the maze your program should print a message to the screen stating that the maze was solved. If your program does not find the exit this should also be stated. All messages, and a print out of the solution, if one is found, should be to the screen. X X x X xx XXXXXXXXXXXXXXXXXXX XXXXXXXX X X X X XXXXX XXXXX X X X X X X X XXX XXXXXXX X XX XXX X X X X X XXXXXXXXXXXXX X X XXXXXXXXXXX XXX X X X X X X xxxx X XXX X X X XXX X XXXXX X XXXXXXXXX X X X XX XX X X X X xxxxxxx X X X X XX XX X X X X X X X xxxx xxx XX XX X XXXXXXX XXXXX X XXX X XXXXXXXXXXX XXX X X X X XX X X X X X X X X xx x XX X X X X X X X X X X XXXXXXXXX XXXXX X X XXX XXXX XXXXX X X X X X X XXXXX XXXXXXXXXXX XXXXXXXXXXXXXXX XXX X X X X XXXXX X XXXXX XXXXXXX X XXX X XXXXX X XXX XX X X X XXXXX X X XXX XXX XXX XXXXX X X XXX X xxxxx xxx X X XXX X XXX X XXX X X X X XXXXX X X XXX X X X X xx x X X X XXXXXXXXX X XXXXXXXXXXX X XXXXXXX XXX X XX X X XX X XXXXX X XXXXXXXXX X XXXXX X XXX XXX X X X X X X X XXXXX XXXXXXX X XXXXXXXXX XXX XXXXX XXX X X XX X X XXXXX X XXX X X XXXXXXXXX X X X XXXXX X XX xx X XX xxx X XXX X XXX XXXXXXX X X X XXXXX X X X X X x x X X X X xx X X X X xxx X X X X X X X X X X X X X X X XXXXXXXXX X XXX XXXXX X XXXXXXXXXXX XXX X X X X X X X X X X X X XXX X XXX XXX X XXX X X X XXXXX X X XXX XX XX X X X XXXXXXXXX XXXXXXXXX XXXXX XXXXX XXX X X XX X X X XX X X X XXX X X XXXXXXX XXXXX X X XXX XXXXX X X X X + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions