Beispiel #1
0
        public ASearch(CellGrid grid)
        {
            Grid = grid;

            foreach (var gridCell in Grid.Cells)
            {
                var cellSpot = new CellSpot(gridCell.Row, gridCell.Col, grid.Rows, grid.Columns, gridCell.Grid)
                {
                    Visited = false, Walls = gridCell.Walls
                };
                CellGridSpot.Add(cellSpot);
            }
            var start = CellGridSpot[0];

            _end = CellGridSpot[CellGridSpot.Count - 1];

            _openSet.Add(start);
        }
Beispiel #2
0
 public Maze(CellGrid grid)
 {
     Grid = grid;
 }