The definition of each
maze cell is very straightforward. We have an array of Boolean values for the walls of the cell. A true
value indicates that a wall exists in that position, and a false
value indicates that the wall is an opening. In the declaration of the array, we have provided initialization values, specifying that a newly-generated cell will have walls on all four sides. We will arbitrarily decide that the first entry in the array (index 0) is the north wall of the cell. From there, we will proceed clockwise around the cell for the remaining walls (1 is equal to east, 2 is equal to south, and 3 is equal to west) as shown in the following image:
The...