diff options
author | Kyle K <kylek389@gmail.com> | 2011-02-01 18:30:28 -0600 |
---|---|---|
committer | Kamil Kaminski <kamilkss@gmail.com> | 2011-02-01 18:30:28 -0600 |
commit | 36665bf9bdcaade9b58fd36be25097fee5e67185 (patch) | |
tree | b6a2275aeb7da7c7f2d588c3876a67b5bc66fc93 | |
parent | 56c6c8d0a485768e591a48a18414305ac3452edb (diff) | |
download | poker-36665bf9bdcaade9b58fd36be25097fee5e67185.tar.gz poker-36665bf9bdcaade9b58fd36be25097fee5e67185.tar.bz2 poker-36665bf9bdcaade9b58fd36be25097fee5e67185.zip |
gave up on ties...
-rw-r--r-- | game.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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; |