From 36665bf9bdcaade9b58fd36be25097fee5e67185 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Tue, 1 Feb 2011 18:30:28 -0600 Subject: gave up on ties... --- game.cpp | 18 ++++++++++++++++-- 1 file 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; -- cgit v1.2.3