예제 #1
0
void GamePlay::getValues()
{

	PlayerHandValue = 0;
	PlayerHandValue = checks.DetermineHand(PlayerValues, psuits);
	inhand = checks.handText(PlayerHandValue);
	for (size_t i = 0; i < listOfComputerPlayers.size(); i++)
	{
		listOfComputerPlayers[i].CpuHandValue = 0;
		listOfComputerPlayers[i].CpuHandValue = checks.DetermineHand(listOfComputerPlayers[i].cvalues, listOfComputerPlayers[i].csuits);
	}
}
예제 #2
0
void GamePlay::uiText()
{
	system("cls");
	
	if (listOfComputerPlayers.size() == 1)
	{
		drawcard.createhand(hand, 25, 40);
		drawcard.createhand(tablehand, 5, 20);
		drawcard.drawCardBack(listOfComputerPlayers[0].cpuhand, listOfComputerPlayers[0].cardX, listOfComputerPlayers[0].cardY, listOfComputerPlayers[0].cardbackColor);
	}
	if (listOfComputerPlayers.size() == 2)
	{
		drawcard.createhand(hand, 25, 40);
		drawcard.createhand(tablehand, 5, 20);
		drawcard.drawCardBack(listOfComputerPlayers[0].cpuhand, listOfComputerPlayers[0].cardX, listOfComputerPlayers[0].cardY, listOfComputerPlayers[0].cardbackColor);
		drawcard.drawCardBack(listOfComputerPlayers[1].cpuhand, listOfComputerPlayers[1].cardX, listOfComputerPlayers[1].cardY, listOfComputerPlayers[1].cardbackColor);
	}
	if (listOfComputerPlayers.size() == 3)
	{
		drawcard.createhand(hand, 1, 40);
		drawcard.createhand(tablehand, 5, 20);
		drawcard.drawCardBack(listOfComputerPlayers[0].cpuhand, listOfComputerPlayers[0].cardX, listOfComputerPlayers[0].cardY, listOfComputerPlayers[0].cardbackColor);
		drawcard.drawCardBack(listOfComputerPlayers[1].cpuhand, listOfComputerPlayers[1].cardX, listOfComputerPlayers[1].cardY, listOfComputerPlayers[1].cardbackColor);
		drawcard.drawCardBack(listOfComputerPlayers[2].cpuhand, listOfComputerPlayers[2].cardX, listOfComputerPlayers[2].cardY, listOfComputerPlayers[2].cardbackColor);
	}
	//drawcard.drawCardBack(listOfComputerPlayers[0].cpuhand, 24, 3);

	if (!showComputer)
	{
		for (size_t i = 0; i < listOfComputerPlayers.size(); i++)
		{
			listOfComputerPlayers[i].computerHandText = "?????";
		}
	}
	if (!shows)
	{
		PressEnterToContinue = " ";
	}
	if (!foldc)
	{
		fold = " ";
	}

	inhand = checks.handText(PlayerHandValue);

	aesthetics.mainText("1");

	//CHANGE ME
	aesthetics.changingText(cash, inhand, listOfComputerPlayers, fold, pot, result);
	
}
예제 #3
0
void GamePlay::finalCards()
{
	//CHANGE ME
	PlayerHandValue = 0;
	listOfComputerPlayers[0].CpuHandValue = 0;
	showComputer = true;
	shows = true;

	system("cls");
	if (tablehand.size() < 4)
	{

		tablehand = hands.dealCards(deck, tablehand, 2);
	}
	if (tablehand.size() < 5)
	{

		tablehand = hands.dealCards(deck, tablehand, 1);
	}
	Cards();
	getValues();
	
	if (playerFold == true)
	{
		PlayerHandValue = 0;
	}
	for (size_t i = 0; i < listOfComputerPlayers.size(); i++)
	{

			listOfComputerPlayers[i].computerHandText = checks.handText(listOfComputerPlayers[i].CpuHandValue);
		
	}

	determine();

	uiText();

	if (listOfComputerPlayers.size() == 1)
	{
		drawcard.createhand(hand, 25, 40);
		drawcard.createhand(tablehand, 5, 20);
		drawcard.createhand(listOfComputerPlayers[0].cpuhand, 24, 3);
	}
	if (listOfComputerPlayers.size() == 2)
	{
		drawcard.createhand(hand, 25, 40);
		drawcard.createhand(tablehand, 5, 20);
		drawcard.createhand(listOfComputerPlayers[0].cpuhand, 1, 3);
		drawcard.createhand(listOfComputerPlayers[1].cpuhand, 60, 3);
	}
	if (listOfComputerPlayers.size() == 3)
	{
		drawcard.createhand(hand, 1, 40);
		drawcard.createhand(tablehand, 5, 20);
		drawcard.createhand(listOfComputerPlayers[0].cpuhand, 1, 3);
		drawcard.createhand(listOfComputerPlayers[1].cpuhand, 60, 3);
		drawcard.createhand(listOfComputerPlayers[2].cpuhand, 60, 40);
	}


	cin.get();


	gameoverCheck();

	Clear();
	system("cls");
	Flop();
}