Question: 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

please help solve with instructions Maze Generation The program will take the

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

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!