public void Add(Settler settler) { settler.Setup(); Settlers.Add(settler); if (!Families.Contains(settler.Family)) { Families.Add(settler.Family); } }
internal bool IsValidForFamilyCountryAndPeriod(UnitFamily family, Country[] countries, Decade decade) { // Unit does not belong to the required family if (!Families.Contains(family)) { return(false); } foreach (Country country in countries) { if (!Operators.ContainsKey(country)) { continue; } if ((Operators[country][0] <= decade) && (Operators[country][1] >= decade)) { return(true); // Found one operator operating the unit during the required decade } } return(false); }