コード例 #1
0
        public override bool AddToFrontier(MazeState aState, Frontier aFrontier = null)
        {
            Frontier selectedFrontier = aFrontier == null ? Frontier : aFrontier;

            if (selectedFrontier.Contains(aState) || Maze.Contains(aState, Searched))
            {
                return(false);
            }
            else
            {
                selectedFrontier.Enqueue(aState);
            }

            return(true);
        }