Skip to content

Commit

Permalink
Evaluator 6 cards
Browse files Browse the repository at this point in the history
  • Loading branch information
jian committed Jun 3, 2014
1 parent 67570a4 commit 74e2bed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/PokerEvaluator.js
Expand Up @@ -76,8 +76,8 @@ module.exports = {
throw new Error("HandRanks.dat not loaded");
}

if (cards.length != 7 && cards.length != 5 && cards.length != 3) {
throw new Error("Hand must be 3, 5, or 7 cards");
if (cards.length != 7 && cards.length != 6 && cards.length != 5 && cards.length != 3) {
throw new Error("Hand must be 3, 5, 6, or 7cards");
}

//if 3 card hand, fill in to make 5 card
Expand All @@ -101,7 +101,7 @@ module.exports = {
p = this.evalCard(p + cards[i]);
}

if (cards.length == 5) {
if (cards.length == 5 || cards.length == 6) {
p = this.evalCard(p)
}

Expand Down

0 comments on commit 74e2bed

Please sign in to comment.