Add generic maze generation methods
maze: * Change emptySquareMaze() to become emptyMaze(int dimension) * emptyMaze now takes 1 or 2 parameteres, and accordingly generate a square or a rectangle maze of the given dimension(s) * Add wallMaze, which generate a maze full of walls. As emptyMaze, it takes one or two parameters model: * Update mazeAppModel tu use the new emptyMaze method
This commit is contained in:
2 files changed
+36
-8
No files matched your search
@@ -24,7 +24,7 @@ public class MazeAppModel extends Observable {
|
||||
private Boolean modified = false;
|
||||
|
||||
public MazeAppModel() {
|
||||
maze = new Maze(Maze.emptySquareMaze());
|
||||
maze = new Maze(Maze.emptyMaze(10));
|
||||
departure = maze.getDeparture();
|
||||
arrival = maze.getArrival();
|
||||
boxList = maze.getVertexes();
|
||||
|
||||
Reference in new issue
Block a user