Implemented royal and straight flushes

This commit is contained in:
2021-06-22 20:18:53 -07:00
parent 20e30f187b
commit 0611b59715
4 changed files with 97 additions and 102 deletions

View File

@@ -38,13 +38,6 @@ int32_t _cardSorter(const void* left, const void* right) {
uint8_t numberL = cardGetNumber(cardL);
uint8_t numberR = cardGetNumber(cardR);
// Make Aces have higher weight (reversed)
if(numberL == CARD_ACE) {
return numberR == CARD_ACE ? 0 : -1;
} else if(numberR == CARD_ACE) {
return 1;
}
// Get the suit and the value of the card (reversed)
return numberR - numberL;
}