We need an algorithm that can find connected components in a maze, and label each cell with a representation of its connected component. This is what will enable us to unite many of the Maze and ThickMaze algorithms together. It will allow:
Easier drawing of Maze where some cells are out of bounds (e.g. through sparsifying): given a start cell and one of more goals (which obviously must be in the same connected component), fill in all cells not in the connected component (or don't, if you wish to be confusing).
This will allow us to simulate a ThickMaze, which has two components (not necessarily connected except in the case of a perfect graph, i.e. walls and floor) in a regular Maze by marking certain transitions as "out of bounds," such as in a ThickMaze moving from a floor to a wall, or in a Maze, moving from one component to another. This should allow us to use multiple algorithms on AbstractMaze directly, if it contains a neighbours method or canMoveFromCell1ToCell2 method.
We need an algorithm that can find connected components in a maze, and label each cell with a representation of its connected component. This is what will enable us to unite many of the
Maze
andThickMaze
algorithms together. It will allow:Easier drawing of
Maze
where some cells are out of bounds (e.g. through sparsifying): given a start cell and one of more goals (which obviously must be in the same connected component), fill in all cells not in the connected component (or don't, if you wish to be confusing).This will allow us to simulate a
ThickMaze
, which has two components (not necessarily connected except in the case of a perfect graph, i.e. walls and floor) in a regularMaze
by marking certain transitions as "out of bounds," such as in aThickMaze
moving from a floor to a wall, or in aMaze
, moving from one component to another. This should allow us to use multiple algorithms onAbstractMaze
directly, if it contains aneighbours
method orcanMoveFromCell1ToCell2
method.