AStar_Incomplete.AStarPathFinder.CalculatePath C# (CSharp) Метод

CalculatePath() публичный Метод

public CalculatePath ( ) : void
Результат void
        public void CalculatePath()
        {
            /*
             * TODO:
             * 1) Create the first node using the StartCell property in Map, the parent should be null since its the starting node
             * 2) set the _current node to the node you just created
             */
            var node = new Node(_map.StartCell, null);
            _openList.Add(node);
            _currentNode = node;

            while (true)
            {
                /* TODO
                 * if the open list has no nodes in it break out of the loop
                 *
                 * Find the Node with the smallest F in the open list and set it to _currentNode
                 * If that node has the same cell index as the target cell (in _map) break out of the loop
                 *
                 * Remove the _currentNode from the open list and add it to the closed list
                 * Add all of the nodes adjacent to the _currentNode to the open list
                 *
                 *
                 */

                ExploreNode(_currentNode, -1, -1, 14);
                ExploreNode(_currentNode, 0, -1, 10);
                ExploreNode(_currentNode, 1, -1, 14);
                ExploreNode(_currentNode, -1, 0, 10);
                ExploreNode(_currentNode, 1, 0, 10);
                ExploreNode(_currentNode, -1, 1, 14);
                ExploreNode(_currentNode, 0, 1, 10);
                ExploreNode(_currentNode, 1, 1, 14);
            }
            _map.HighlightPath(_currentNode);
        }