Britbot

Calculates the minimum amount of turns that a island will be under our control.

Returns:
Distance of the nearest enemy group + the amount of turns it will take them to capture it

Definition at line 282 of file SmartIsland.cs.

        {
            int tempDistance;
            int minDistance = Bot.Game.GetCols() + Bot.Game.GetRows();

            foreach (EnemyGroup eGroup in Enemy.Groups)
            {
                tempDistance = Bot.Game.Distance(this.Loc, eGroup.GetLocation());
                if ((minDistance > tempDistance) && (eGroup.GetMaxFightPower() >= myGroup.FightCount()))
                    minDistance = tempDistance;
            }

            return minDistance + this.CaptureTurns;
        }