summaryrefslogtreecommitdiffstats
path: root/sorthand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sorthand.cpp')
-rw-r--r--sorthand.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/sorthand.cpp b/sorthand.cpp
deleted file mode 100644
index e713b7d..0000000
--- a/sorthand.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * sorthand.cpp
- *
- *
- */
-
-#include "sorthand.h"
-
-SortHand::SortHand()
-{
-
-}
-
-void SortHand::sortFourOfAKind(Card **cards, struct countAndType *maxCount)
-{
-#if 0
- int i;
- /* find the card that is different from other four */
- for (i = 0; i < 5; i++)
- if (cards[i]->getType()[0] != maxCount->type)
- break;
-#endif
-
- int k;
- for (k = 0; k < 5; k++)
- if (cards[k]->getType()[0] == maxCount->type)
- {
- cards[k]->specialRank();
-#ifdef DEBUG
- cout << ANSI_COLOR_CYAN << "\ndebug: sortFourOfAKind(): "
- << cards[k]->getType() << " at cards[" << k
- << "] gets special rank "<< endl << ANSI_COLOR_RESET;
-#endif
- }
-}
-
-void SortHand::sortThreeOfAKind(Card **cards, struct countAndType *threeCount)
-{
- int i;
- /* find 2 cards that are different from other three */
- for (i = 0; i < 5; i++)
- if (cards[i]->getType()[0] != threeCount->type)
- break;
-
- int j;
- for (j = 0; j < 5; j++)
- if ((cards[j]->getType()[0] != threeCount->type) && (i != j))
- break;
-
-#ifdef DEBUG
- cout << ANSI_COLOR_CYAN << "\ndebug: sortThreeOfAKind(): card " << cards[i]->getType()
- << " and " << cards[j]->getType() << " are different from other 3 cards"
- << endl << ANSI_COLOR_RESET;
-#endif
-
- cards[i]->specialRank();
- cards[j]->specialRank();
-}
-