public bool castVote(Player voter, Player target)
 {
     if (this.day && voter.checkPulse() && target.checkPulse() && (!voter.hasVoted()))
     {
         voter.vote(target);
     }
     else if (voter.checkPulse() && target.checkPulse() && (!voter.hasVoted()) && voter.getRole().GetType().Equals(typeof(Werewolf)))
     {
         voter.vote(target);
     }
     else
     {
         return(false);
     }
     return(true);
 }
Example #2
0
 // Vote on other player.
 public void vote(Player player)
 {
     if (this.alive && !this.voted && player.checkPulse())
     {
         this.voteTarget = player;
         player.addVote();
         this.voted = true;
     }
 }