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

ExploreNode() приватный Метод

private ExploreNode ( AStar_Incomplete.Node parentNode, int columnOffset, int rowOffset, int gCost ) : void
parentNode AStar_Incomplete.Node
columnOffset int
rowOffset int
gCost int
Результат void
        private void ExploreNode(Node parentNode, int columnOffset, int rowOffset, int gCost)
        {
            var adjacentCellIndex = _map.GetAdjacentCellIndex(parentNode.CellIndex, columnOffset, rowOffset);

            // Ignore unwalkable nodes (or nodes outside the grid)
            if (adjacentCellIndex == -1)
                return;

            // TODO: Ignore nodes on the closed list

            if (OpenUpdatePathCost(parentNode, gCost, adjacentCellIndex))
                return;

            AddAdjacentCellToOpenList(parentNode, gCost, adjacentCellIndex);
        }