|
Britbot
|
Determines if an enemy pirate belongs to to the group of id's specified.
Definition at line 397 of file EnemyGroup.cs. {
Pirate ePirate = Bot.Game.GetEnemyPirate(enemyPirate);
if (ePirate.IsLost)
return false;
//Check if the given pirate is close (max of 2 distance units) to any of the pirates already in this group
return
group.ConvertAll(e => Bot.Game.GetEnemyPirate(e))
.Select(ep => Bot.Game.Distance(ep, ePirate))
.Concat(new int[] {})
.Min() <= 2;
}
|
1.7.6.1