private void UpdateSquadMeleeStatus(BattleSquad squad) { bool atLeastOneSoldierInMelee = false; foreach (BattleSoldier soldier in squad.Soldiers) { soldier.IsInMelee = _grid.IsAdjacentToEnemy(soldier.Soldier.Id); if (soldier.IsInMelee) { atLeastOneSoldierInMelee = true; } } squad.IsInMelee = atLeastOneSoldierInMelee; }