diff options
-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; |