private bool OpenUpdatePathCost(Node parentNode, int gCost, int cellIndex)
{
var adjacentNode = _openList.SingleOrDefault(n => n.CellIndex == cellIndex);
if (adjacentNode != null)
{
if (parentNode.G + gCost < adjacentNode.G)
{
adjacentNode.Parent = parentNode;
/*
* TODO: calculate the values of G and H for adjacentNode
*/
}
return true;
}
return false;
}