示例#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);
        }
示例#2
0
文件: Maze.cs 项目: acaktas/wpfGrid
 public Maze(CellGrid grid)
 {
     Grid = grid;
 }