Beispiel #1
0
 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;
 }
Beispiel #2
0
        public void GenerateMaze()
        {
            _mazeEdges = null;
            solved     = false;
            solvingAlgorithm.reset();
            maze = new UpTree(width, height);

            generatingAlgorithm.GenerateMaze(this);

            Console.WriteLine(generatingAlgorithm.GetIterations());
        }