bool removeWall(int row, int col, bool wall) // 0 for top, 1 for side
// returns true if all rooms are connected
rooms[row][col].top = false;
connect.unionSetsSize(room1Root, room2Root);
}
}// end remove a top
if (wall && (!rooms[row][col].left || col== 0))
// try to romove top (already removed)
return false;
else if (wall && col!=0 && rooms[row][col].left )
{
}
}// end remove a left wall
return connect.allDone();
}
void printMaze()
{
for (int i = 0; i < numRows+1; i++)
{
for (int j = 0; j < numCols+1; j++)
if (rooms[i][j].top)