コード例 #1
0
ファイル: MazeSolver.cs プロジェクト: Bery0za/Mazeraptor
        public void SolveMaze(Maze maze, Cell startCell, Cell endCell)
        {
            Result = Result.NotSolvedYet;

            cancel    = false;
            this.maze = maze;
            structure = maze.Structure;

            if (!structure.ContainsCells(startCell, endCell))
            {
                throw new ArgumentException("Maze doesn't contain one of the given cells");
            }

            Stage?.Invoke(ProgressStage.Started, maze, 0f);
            ProcessSolving(startCell, endCell);
        }