Example #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;
 }
Example #2
0
 public Vote(Voter voter, TimeSpan voteTime)
 {
     this.voter = voter;
     this.voteTime = voteTime;
 }
Example #3
0
 public bool isThisVoter(Voter voter)
 {
     return this.voter.Equals(voter);
 }
Example #4
0
 public bool addUser(Voter voter)
 {
     bool success = !voters.Contains(voter);
     if (success) voters.Add(voter);
     return success;
 }