sraaphorst / spelunker

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

T94: ThickMaze start / goal positions #103

Closed sraaphorst closed 6 years ago

sraaphorst commented 6 years ago

This PR accomplishes the following:

  1. Adds a new class, ReversibleMaze, to identify mazes that can be reversed.
  2. Makes ThickMaze a ReversibleMaze.
  3. Adds an exception, IllegalCellPosition, to be thrown if a special cell (start or goal) is in bounds but not assigned to a legal cell (e.g. is on a wall).
  4. Adds a class enum, SpecialMazeType to represent the types of start and goal cells, and a function to translate them into string names.
  5. Added test case for ThickMaze to make sure it obeys reversibility rules.