-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Description
Looks like four-of-a-kind is missing in the highestRank() function
var highestRank = function (hand) {
var result = "bust"; // default is bust
if (containsRoyalFlush(hand)) {
result = "royal flush";
} else if (containsStraightFlush(hand)) {
result = "straight flush";
} else if (containsFullHouse(hand)) {
result = "full house";
} else if (containsFlush(hand)) {
result = "flush";
} else if (containsStraight(hand)) {
result = "straight";
} else if (containsThreeOfAKind(hand)) {
result = "three of a kind";
} else if (containsTwoPair(hand)) {
result = "two pair";
} else if (containsPair(hand)) {
result = "pair";
}
return result;
}
Metadata
Metadata
Assignees
Labels
No labels