public void RemoveEmptyGroup(UnitGroup group) { if (group.GetTotalQty() == 0) { if (attackers.Contains(group)) { attackers.Remove(group); } if (defenders.Contains(group)) { defenders.Remove(group); } } }