Пример #1
0
void Mano::HacerJugada()
{
	if (!CheckStraighFlush())
	{
		if (!CheckFourOfAKind())
		{
			if (!CheckFullHouse())
			{
				if (!CheckFlush())
				{
					if (!CheckStraight())
					{
						if (!CheckThreeOfAKind())
						{
							if (!CheckTwoPair())
							{
								if (!CheckPair())
								{
									if (!CheckHighCard())
									{
										void;
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
Пример #2
0
unsigned int HandRank::GetHandRank(list<Card> cards)
{
	unsigned int HandRank = 0;
	cards.sort();
	cards.reverse();

	if( CheckFlush(cards, HandRank)) return HandRank;
	if( CheckStraight(cards, HandRank)) return HandRank;
	if( CheckThreeOfAKind(cards, HandRank)) return HandRank;
	if( CheckTwoPair(cards, HandRank)) return HandRank;
	if( CheckPair(cards, HandRank) ) return HandRank;

	SetHighCard(cards, HandRank);
	return HandRank;
}