sraaphorst / spelunker

Maze generation and solving library
Other
11 stars 2 forks source link

Refine GraphMaze to be the main class, with other classes a specialization #125

Open sraaphorst opened 6 years ago

sraaphorst commented 6 years ago

In order to allow for any types of mazes, the most flexible operation would be to have GraphMaze be the base structure (based on Boost.Graph), with vertices and edges indicating adjacency / neighbours. (A maze in its most general form should be cells and neighbours, with a start and end position.)

Then we can move the majority of algorithms from Maze to GraphMaze, with some exceptions, which we'll leave on Maze and ThickMaze, that will be convenience wrappers around certain instances of GraphMaze.

This is a major task, and we will see if I decide to do it or not.

sraaphorst commented 6 years ago

We will have to change some fundamental definitions. For example:

Let N be the maximum number of walls a cell can have.

A cell is a dead end if it has N-1 walls.

A cell is a juncture if it has N-3 walls or fewer.