Add and fix tests for the Serializers.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5a642b354b
commit
3bf438ffb9
4 changed files with 107 additions and 0 deletions
|
|
@ -86,6 +86,21 @@ public class Wilson extends AbstractMazeGeneratorAlgorithm {
|
|||
direction = determineDirectionForDigging(maze.getEnd());
|
||||
t = maze.getEndTile();
|
||||
this.digTo(t, direction);
|
||||
// seal all walls, mark all as visited
|
||||
for (int x = 0; x < maze.getWidth(); x++) {
|
||||
for (int y = 0; y < maze.getHeight(); y++) {
|
||||
maze.getTileAt(x, y).forEach(tile -> {
|
||||
Stream.of(Direction.values())
|
||||
.forEach(d -> {
|
||||
if (tile.hasWallAt(d)) {
|
||||
tile.preventDiggingToOrFrom(d);
|
||||
} else {
|
||||
tile.digFrom(d);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue