Ejemplo n.º 1
0
//clients can vote
void  CVotingSystem::Vote(int id, int team, bool yes)
{
  if(CanVote(id))
  {
    m_votes.push_back(id);
		if(yes)
		{
			++m_numVotes;
			if(m_team == team)
				++m_teamVotes;
		}
  }
}
//clients can vote
void  CVotingSystem::Vote(EntityId id, int team, bool yes)
{
  if(CanVote(id))
  {
		if(yes)
		{
			m_votesFor.push_back(id);
		}
		else
		{
			m_votesAgainst.push_back(id);
		}
  }
}