예제 #1
0
파일: Season.cs 프로젝트: abs508/jHc
        /// <summary>
        /// Get the current handicap for the athlete. The handicap is the rounded one.
        /// </summary>
        /// <param name="key">unique key</param>
        /// <returns>rounded handicap</returns>
        public RaceTimeType GetAthleteHandicap(int key, NormalisationConfigType hcConfiguration)
        {
            if (Athletes != null && Athletes.Count > 0)
            {
                if (Athletes.Exists(athlete => athlete.Key == key))
                {
                    return(Athletes.Find(athlete => athlete.Key == key).GetRoundedHandicap(hcConfiguration));
                }
            }

            return(null);
        }