Remove Some Walls to Form a Maze

Add required methods to remove the walls to form a maze.

Adding cell methods for removing walls

To generate a maze, MazeGenerator has to remove some walls. First, MazeGenerator will need a way to find which cells have not been added to the maze yet. In other words, it needs to identify which cells still have all four walls.

  1. In, add a public method called hasAllWalls(). It should take no parameters and return a Boolean value.
  2. Add a Boolean called allWalls which is true if every element in the wall is true using logical operators to compare the contents of each element.
  3. Return allWalls.
  ________________ hasAllWalls(______) {
    _______________ allWalls = ________ && ________ && ________ && ________;
    return ________;

Get hands-on with 1200+ tech skills courses.