public Maze(int width, int height, ISolvingAlgorithm solving, IGeneratingAlgorithm generating) { maze = new UpTree(width, height); this.width = width; this.height = height; solvingAlgorithm = solving; generatingAlgorithm = generating; start = 0; end = (width * height) - 1; }
public void GenerateMaze() { _mazeEdges = null; solved = false; solvingAlgorithm.reset(); maze = new UpTree(width, height); generatingAlgorithm.GenerateMaze(this); Console.WriteLine(generatingAlgorithm.GetIterations()); }