Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help solve with instructions Maze Generation The program will take the following arguments from the command line: nrRows nrCols maze.txt where nrRows is the

please help solve with instructions

image text in transcribed

Maze Generation The program will take the following arguments from the command line: nrRows nrCols maze.txt where nrRows is the number of rows, nrCols is the number of columns, and maze.txt is the name of the output file. You should use Depth First Search to generate a random maze. The maze should then be written to the file maze.txt. The format of the output file is as follows: first line contains the number of rows and the number of columns second line contains the number of remaining lines in the file each line from the third to the last contains the row index, the column index, and a string describing which walls are up. For example, the line 2 3 LRU indicates that the cell in row 2 and column 3 has the left, right, and up walls. You should use L for the left wall - R for the right wall - U for the up wall - D for the down wall If a cell has no wall, then you do not need to specify it in the input file. If you do, then you can write none after its coordinates to indicate that it has no walls. Maze Generation The program will take the following arguments from the command line: nrRows nrCols maze.txt where nrRows is the number of rows, nrCols is the number of columns, and maze.txt is the name of the output file. You should use Depth First Search to generate a random maze. The maze should then be written to the file maze.txt. The format of the output file is as follows: first line contains the number of rows and the number of columns second line contains the number of remaining lines in the file each line from the third to the last contains the row index, the column index, and a string describing which walls are up. For example, the line 2 3 LRU indicates that the cell in row 2 and column 3 has the left, right, and up walls. You should use L for the left wall - R for the right wall - U for the up wall - D for the down wall If a cell has no wall, then you do not need to specify it in the input file. If you do, then you can write none after its coordinates to indicate that it has no walls

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

The Functions of Language Problems with Language

Answered: 1 week ago

Question

The Nature of Language

Answered: 1 week ago