sraaphorst / spelunker

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

T2: More test cases and a ThickMazeGeneratorByHomomorphism class #90

Closed sraaphorst closed 6 years ago

sraaphorst commented 6 years ago

This PR does the following:

  1. Creates a new subclass of ThickMazeGenerator, namely ThickMazeGeneratorByHomomorphism, which takes in a pointer to a MazeGenerator and can then use the MazeGenerator via the Homomorphism<Maze, ThickMaze> to produce ThickMazes without having to explicitly call the Homomorphism.
  2. Adds test cases to test the effects of applying Symmetry transformations to ThickMazes.
  3. Extracts the wall ranking test code out of Maze, which checks that both Positions on either side of a wall rank to the same WallID, and that for every WallID, some Position ranks to it.
  4. Extracts the wall unranking test code out of MazeGenerator, which checks that a WallID unranks into two Positions, both of which rank back to the same WallID.
  5. Adds some operators to Dimensions2D to make it easier to work with.
  6. Comprises general cleanup.