diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -33,18 +33,26 @@ int main(int argc, char *argv[]) pokerGame->printPile(); #endif + /* all methods assume that cards are sorted, it is our responsibility to + * to meet that, this results in simpler code */ cout << "\n> Dealing cards to the user" << endl; pokerGame->dealUserCards(); pokerGame->sortUserCards(); cout << "Cards in your hand: "; pokerGame->printUserCards(); + pokerGame->userAI(pokerGame->getUserCards()); + cout << "\nFinal cards in your hand: "; + pokerGame->sortUserCards(); + pokerGame->printUserCards(); +#if 0 cout << "Number of same cards: " << pokerGame->numOfSameCards(pokerGame->getUserCards()) << endl; if (pokerGame->pairOrBetter(pokerGame->getUserCards())) cout << "User has pair or better" << endl; + struct countAndSuit userCountAndSuit = pokerGame->numOfSameSuit(pokerGame->getUserCards()); cout << "Top suit: " << *pokerGame->suits[userCountAndSuit.whatSuit] << ", count: " << userCountAndSuit.count << endl; @@ -55,8 +63,9 @@ int main(int argc, char *argv[]) pokerGame->discardAndDraw( pokerGame->getUserCards(), 2, 3 ); cout << "Cards in your hand after discarding: "; pokerGame->printUserCards(); +#endif - cout << "\n> Dealing cards to opponent(s)" << endl; + cout << "> Dealing cards to opponent(s)" << endl; pokerGame->dealOpponentCards(); pokerGame->sortOpponentCards(); |