summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2011-02-01 18:30:28 -0600
committerKamil Kaminski <kamilkss@gmail.com>2011-02-01 18:30:28 -0600
commit36665bf9bdcaade9b58fd36be25097fee5e67185 (patch)
treeb6a2275aeb7da7c7f2d588c3876a67b5bc66fc93
parent56c6c8d0a485768e591a48a18414305ac3452edb (diff)
downloadpoker-36665bf9bdcaade9b58fd36be25097fee5e67185.tar.gz
poker-36665bf9bdcaade9b58fd36be25097fee5e67185.tar.bz2
poker-36665bf9bdcaade9b58fd36be25097fee5e67185.zip
gave up on ties...
-rw-r--r--game.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/game.cpp b/game.cpp
index a59f433..03a66f0 100644
--- a/game.cpp
+++ b/game.cpp
@@ -925,7 +925,7 @@ void Game::determineWinner(void)
whatIndex = i;
}
- /* deal with ties */
+ /* count number of ties */
int numOfTies = 0;
for (i = 0; i < numOfPlayers; i++)
if (playerHands[i] == min)
@@ -940,7 +940,21 @@ void Game::determineWinner(void)
<< " players" << endl << ANSI_COLOR_RESET;
#endif
- /* XXX: UNFINISHED */
+#if 0
+ /* deal with ties */
+ int j, k, rank1, rank2;
+ for (i = 0; i < 5; i++)
+ {
+ if (ties[i] == false)
+ continue;
+
+ for (j = 0; j < 5; j++)
+ {
+ if ((i == j) || (ties[j] == false))
+ continue;
+ }
+ }
+#endif
cout << ANSI_COLOR_CYAN << endl << *winmsg[whatIndex] << endl
<< ANSI_COLOR_RESET;