From 579915ba835cb0a1f0f893881c09e6b59c6a7f0e Mon Sep 17 00:00:00 2001 From: Kyle K Date: Sat, 29 Jan 2011 20:26:13 -0600 Subject: small cleanups --- main.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/main.cpp b/main.cpp index 01ce7fd..7f587ee 100644 --- a/main.cpp +++ b/main.cpp @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) bool quit = false; while (!quit) { - cout << "\nThe deck is being shuffled" << endl; + cout << "\n> The deck is being shuffled" << endl; pokerGame->shufflePile(); #ifdef DEBUG @@ -33,44 +33,42 @@ int main(int argc, char *argv[]) pokerGame->printPile(); #endif - cout << "\nDealing cards to the user" << endl; + cout << "\n> Dealing cards to the user" << endl; pokerGame->dealUserCards(); pokerGame->sortUserCards(); - cout << "Cards in your hand: "; + cout << "> Cards in your hand: "; pokerGame->printUserCards(); cout << "Number of same cards: " << pokerGame->numOfSameCards(pokerGame->getUserCards()) << endl; - if ( pokerGame->pairOrBetter(pokerGame->getUserCards())) + 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; - if ( pokerGame->doWeHaveAnAce(pokerGame->getUserCards()) ) + if (pokerGame->doWeHaveAnAce(pokerGame->getUserCards()) ) cout << "You have an Ace!" << endl; pokerGame->discardAndDraw( pokerGame->getUserCards(), 2, 3 ); - cout << "Cards in your hand after discarding: "; + cout << "> Cards in your hand after discarding: "; pokerGame->printUserCards(); - cout << "\nDealing cards to opponent(s)" << endl; + cout << "\n> Dealing cards to opponent(s)" << endl; pokerGame->dealOpponentCards(); pokerGame->sortOpponentCards(); + +#ifdef DEBUG cout << "Opponents' cards:" << endl; pokerGame->printOpponentCards(); -#ifdef DEBUG cout << "\nComputer's AI"; pokerGame->opponentAI(pokerGame->getOpponentsCards(1)); - pokerGame->printOpponentCards(); cout << "Resorted Opponents' cards:" << endl; pokerGame->printOpponentCards(); -#endif -#ifdef DEBUG PRINT_COLOR(ANSI_COLOR_CYAN, "\ndebug: deck after being delt to opponents and user\n"); pokerGame->printPile(); #endif -- cgit v1.2.3