Question: Write a function for MazeSolver GIVEN enum direction {SOUTH, EAST}; struct Position { int row; int column; }; private: //PRIVATE DATA MEMBERS: int maze_rows_ =

Write a function for MazeSolver

GIVEN

enum direction {SOUTH, EAST};

struct Position { int row; int column; };

private: //PRIVATE DATA MEMBERS: int maze_rows_ = 0; //the number of rows as read file from input file int maze_columns_ = 0; //the number of cplumns as read from input file bool maze_ready = false; //indicates whether the maze has been initialized from input file char** maze_ = nullptr; //a 2-d character array containint maze characters read from input file char** solution_ = nullptr; //a 2-d character array containint maze characters as in maze_ and path to exit marked with '>' characters std::stack backtrack_stack_; //stack used for backtracking

//pre: rows and columns are positive integers //post: allocates maze_ with rows and columns void initializeMaze(int rows, int columns); // WRITE THIS FUNCTION

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!