Пример #1
0
void GamePlay::NewHand()
{
	Poker a;
	
	foldc = false;
	//call the NewHand method to begin a new hand without changing the pot and cash values
	Clear();// clearing all stored variables
	cash = cash;
	cpucash = cpucash;
	system("cls"); // clearing the screen
	a.createdeck(deck); // creating a deck of cards
	a.tablecards(deck, 8); // creating the table cards passing value for amount of cards
	// begins at 5, so 8 for 3 cards 9 for 4 cards and 10 for 5 cards, should be able to clear tablecards and pass in
	//new value as long as deck is not shuffled so starts at 8, bet 1 add card bet 2 add another, bet 3 determine winner
	a.playercard(deck);// creates the players hand with 2 cards
	a.cpucard(deck);//creates the players hand with 2 cards
	Game(); // begins the game



}
Пример #2
0
//resets all game stuff 
void GamePlay::Start() //What user will see first, displays start money (Omoney)
{
	Poker a;
	//call the Start method when you want to start a new game
	Clear();// clearing all stored variables
	//GamePlay();
	system("cls"); // clearing the screen
	cash = 200; // initializing player cash amount
	cpucash = 200; // initializing cpu cash amount
	pot = 0; // initializing pot value to 0
	a.createdeck(deck); // creating a deck of cards
	//a.shuffle(deck); // shuffling the deck
	a.tablecards(deck, 8); // creating the table cards passing value for amount of cards
	// begins at 5, so 8 for 3 cards 9 for 4 cards and 10 for 5 cards, should be able to clear tablecards and pass in
	//new value as long as deck is not shuffled so starts at 8, bet 1 add card bet 2 add another, bet 3 determine winner
	a.playercard(deck);// creates the players hand with 2 cards
	a.cpucard(deck);//creates the players hand with 2 cards
	a.createhand(hand, 25, 40); // draw player cards, passing in hand, 5 and 20 stay the same for location
	a.createtable(tablehand, 5, 17);// drawing the table cards passing in table hand, 5 and 7 stay for location
	Game(); // begins the game

}