Exemplo n.º 1
0
 internal IEnumerable <int> GetAllUndecidedCandidatesIds(CandidatesStatus candidates4Vote)
 {
     for (int i = 0; i < ballot.OrderedCandidatesIds.Count; i++)
     {
         if (candidates4Vote.IsUndecided(ballot.OrderedCandidatesIds[i]))
         {
             yield return(ballot.OrderedCandidatesIds[i]);
         }
     }
 }
Exemplo n.º 2
0
        internal int GetTopCandidateId(CandidatesStatus candidates4Vote)
        {
            for (int i = 0; i < ballot.OrderedCandidatesIds.Count; i++)
            {
                if (candidates4Vote.IsUndecided(ballot.OrderedCandidatesIds[i]))
                {
                    return(ballot.OrderedCandidatesIds[i]);
                }
            }

            return(CandidatesAndIds.InvalidId);
        }