public MazeUserControl(MazeDrawer mazeDrawer)
 {
     InitializeComponent();
     this.mazeDrawer = mazeDrawer;
     blurAnimation   = new BlurAnimation(this);
     DrawGrid();
 }
Пример #2
0
        public DfsSolver(MazeDrawer mazeDrawer, MazeSettings mazeSettings, SliderValue sleep)
        {
            this.mazeDrawer   = mazeDrawer;
            this.mazeSettings = mazeSettings;
            this.sleep        = sleep;

            DrawStartCell();
            DrawEndCell();
        }
Пример #3
0
 public Dfs(MazeDrawer mazeDrawer, BackgroundWorker backgroundWorker, SliderValue sleep, MazeSettings mazeSettings)
 {
     this.mazeDrawer       = mazeDrawer;
     this.backgroundWorker = backgroundWorker;
     this.sleep            = sleep;
     this.mazeSettings     = mazeSettings;
     SetVar();
     SetListOfUnvisitedCell(mazeDrawer);
 }
Пример #4
0
 private void SetListOfUnvisitedCell(MazeDrawer mazeDrawer)
 {
     for (int i = 0; i < mazeSettings.NumberOfCellsY; i++)
     {
         for (int j = 0; j < mazeSettings.NumberOfCellsX; j++)
         {
             ListOfUnvisitedCell.Add(mazeDrawer.Cells[j, i]);
         }
     }
     ListOfUnvisitedCell.Remove(currentCell);
 }
 private void CreateMazeDrawerAndEngine()
 {
     mazeSettings = new MazeSettings();
     mazeDrawer   = new MazeDrawer(mazeSettings);
     mazeEngine   = new MazeEngine(mazeDrawer, mazeSettings);
 }
Пример #6
0
 public MazeEngine(MazeDrawer mazeDrawer, MazeSettings mazeSettings)
 {
     this.mazeDrawer   = mazeDrawer;
     this.mazeSettings = mazeSettings;
     CreateBackgroundWorker();
 }