示例#1
0
 public RunJudging(RoundContestant contestant, Judge judge, JudgingCriterion criterion, int runNo, decimal?score) : this()
 {
     RoundContestant   = contestant;
     RoundContestantId = contestant.Id;
     Judge             = judge;
     JudgeId           = judge.Id;
     Criterion         = criterion;
     CriterionId       = criterion.Id;
     RunNo             = runNo;
     Score             = score;
 }
示例#2
0
        public RoundContestant AddContesant(Contestant contestant)
        {
            contestant.EnsureListsAreInitialized();
            var rc = new RoundContestant()
            {
                Contestant = contestant,
                Round      = this
            };

            contestant.RoundParticipations.Add(rc);
            this.ContestantEntries.Add(rc);
            return(rc);
        }
示例#3
0
        public void AssignHeatFor(RoundContestant rc)
        {
            var contestants   = ContestantEntries.ToList();
            var maxHeat       = contestants.Max(p => p.HeatNo);
            int ordinal       = contestants.Max(p => p.Ordinal) + 1;
            var playersInHeat = contestants.Count(p => p.HeatNo == maxHeat);

            if (playersInHeat >= ContestantsPerHeat)
            {
                maxHeat++;
            }
            rc.HeatNo  = maxHeat;
            rc.Ordinal = ordinal;
        }