|
Britbot
|
This function should be called PER TARGET in the Navigator.CalculatePath method it updates the heuristic values based on distance from the target also sets G value to default -1.
Definition at line 207 of file Node.cs. {
Logger.BeginTime("SetUpCalculation");
//going over all the cells in the Map updating their heuristic value to be
//distance from target
for (int y = 0; y < Bot.Game.GetRows(); y++)
{
for (int x = 0; x < Bot.Game.GetCols(); x++)
{
Node.Map[y, x].H = Node.HuristicFunction(Node.Map[y, x].Loc, target);
//set the calculated G parameter to -1
Node.Map[y, x].G = -1;
Node.Map[y, x].IsEvaluated = false;
}
}
Logger.StopTime("SetUpCalculation");
}
|
1.7.6.1