public bool RegisterVote(Client c, string vote)
{
if (ActiveRound == null || ActiveRound.Flipped)
{
return false;
}
if (!CardSet.Default.Cards.Contains(vote))
{
return false;
}
if (c.Info.IsSpectator)
{
return false;
}
bool result = ActiveRound.RegisterVote(new Vote() { ClientID = c.Info.ID, ClientName = c.Info.Name, VoteValue = vote });
CheckVoteCount();
if(result)
{
// If successful, broadcast the new state to the clients.
BroadcastGameState();
}
return result;
}