Exemple #1
0
 public bool vote(int uid, Voter voter)
 {
     bool success = false;
     if (voter != null)
     {
         success = songs[uid].vote(new Vote(voter, DateTime.Now - createdOn));
         if (success) songspriority[uid] = songs[uid].getPriority();
     }
     return success;
 }
Exemple #2
0
 public Vote(Voter voter, TimeSpan voteTime)
 {
     this.voter = voter;
     this.voteTime = voteTime;
 }
Exemple #3
0
 public bool isThisVoter(Voter voter)
 {
     return this.voter.Equals(voter);
 }
Exemple #4
0
 public bool addUser(Voter voter)
 {
     bool success = !voters.Contains(voter);
     if (success) voters.Add(voter);
     return success;
 }