Britbot
static void Britbot.Navigator.Node.CalculateEnemyWeight ( int  strength) [inline, static]

This adds the wight of the enemies wich pose a threat to the specified group size.

Parameters:
strengthstrength of the group

Definition at line 139 of file Node.cs.

            {
                Logger.BeginTime("CalculateEnemyWeight");
                //---------------#Magic_Numbers--------------------
                //Important constants of the functions
                //the radious under wich to define locations in danget of enemy groups
                //the higher it is, the performence are worse
                //int DangerRadious = 9 * Bot.Game.GetAttackRadius();

                //going over enemy fleets and giving their location negative scores
                foreach (EnemyGroup eGroup in Enemy.Groups)
                {
                    if (eGroup.GetMaxFightPower() >= strength)
                    {
                        foreach (int p in eGroup.EnemyPirates)
                            Node.BlockLocation(Bot.Game.GetEnemyPirate(p).Loc, Magic.DangerZone, eGroup.GetHeading());
                    }
                }
                Logger.StopTime("CalculateEnemyWeight");
            }