private void UpgradeChildren(INodeList openList, BoardNode visitedNode) { return; foreach (var node in visitedNodes.Where(node => node.Value.Previous == visitedNode)) { node.Value.Cost = visitedNode.Cost + 1; if (openList.Upgrade(node.Value)) { UpgradeChildren(openList, node.Value); } } }
private void UpgradeChildren(INodeList openList,BoardNode visitedNode) { return; foreach (var node in visitedNodes.Where(node => node.Value.Previous == visitedNode)) { node.Value.Cost = visitedNode.Cost + 1; if (openList.Upgrade(node.Value)) UpgradeChildren(openList, node.Value); } }