summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2011-01-29 20:26:13 -0600
committerKamil Kaminski <kamilkss@gmail.com>2011-01-29 20:26:13 -0600
commit579915ba835cb0a1f0f893881c09e6b59c6a7f0e (patch)
tree763f458e0c758d8f41fdabb9762636cf34ab84d4
parentf3ecbd6df972f22566d9055297dfabd8decb9c07 (diff)
downloadpoker-579915ba835cb0a1f0f893881c09e6b59c6a7f0e.tar.gz
poker-579915ba835cb0a1f0f893881c09e6b59c6a7f0e.tar.bz2
poker-579915ba835cb0a1f0f893881c09e6b59c6a7f0e.zip
small cleanups
-rw-r--r--main.cpp20
1 files 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