public MazeUserControl(MazeDrawer mazeDrawer)
 {
     InitializeComponent();
     this.mazeDrawer = mazeDrawer;
     blurAnimation   = new BlurAnimation(this);
     DrawGrid();
 }
Ejemplo n.º 2
0
        public DfsSolver(MazeDrawer mazeDrawer, MazeSettings mazeSettings, SliderValue sleep)
        {
            this.mazeDrawer   = mazeDrawer;
            this.mazeSettings = mazeSettings;
            this.sleep        = sleep;

            DrawStartCell();
            DrawEndCell();
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 6
0
 public MazeEngine(MazeDrawer mazeDrawer, MazeSettings mazeSettings)
 {
     this.mazeDrawer   = mazeDrawer;
     this.mazeSettings = mazeSettings;
     CreateBackgroundWorker();
 }