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
Get step-by-step solutions from verified subject matter experts
