Britbot
static double Britbot.Navigator.Node.HuristicFunction ( Location  loc1,
Location  loc2 
) [inline, static]

this determines the huristic function used for the A* algorithm based on the EuclidianHuristic constant in Node

Parameters:
loc1first location
loc2second location
Returns:
huristic cost of going between them

Definition at line 234 of file Node.cs.

            {
                //if we chose euclidian huristic
                if (Magic.EuclidianHuristic)
                    return Bot.Game.EuclidianDistanceSquared(loc1, loc2);
                // Manhatten huristic
                return Bot.Game.Distance(loc1, loc2);
            }