Question: C++. This method first puts dummy values in every square and then adds random horizontal and vertical walls. Only place walls in the odd numbered

C++. This method first puts dummy values in every square and then adds random horizontal and vertical walls.

Only place walls in the odd numbered rows and columns (in other words, row one might have a row, but then row 2 would not, whereas row three could and row 4 could not), same with columns. For each wall, pick randomly for vertical or horizontal (just rand() % 2 to get either 0 for vertical, 1 for horizontal. 9 squares must be in row 3. Add a D to the beginning of the square and an E to the end square.

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!