Britbot
static void Britbot.Navigator.Node.SetUpCalculation ( Location  target) [inline, static]

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.

Parameters:
target

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");
            }