Beispiel #1
0
 /// <summary>
 /// Gets the maximum age among a species' cohorts.
 /// </summary>
 /// <returns>
 /// The age of the oldest cohort or 0 if there are no cohorts.
 /// </returns>
 public static ushort GetMaxAge(ISpeciesCohorts cohorts)
 {
     if (cohorts == null || !cohorts.Any())
     {
         return(0);
     }
     else
     {
         //  First cohort is the oldest
         return(cohorts.First().Age);
     }
 }