Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed pokerIn4Hours sd variable initialization issue (issue #2) in or…
…der to calculate correctly the case: AD, AS, AH, AC, 2D
  • Loading branch information
iguigova committed Aug 28, 2014
1 parent 5705b32 commit 9ce578e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pokerIn4Hours/pokerIn4Hours.js
Expand Up @@ -30,7 +30,7 @@ var evalHand = function(input){
var p2 = 0; // two pair / two one pairs
var p1 = 0; // one pair / two of a kind
var k = 0; // kickers
var sd = cards(14); // straight discriminant: count A as 1 or 14
var sd = Math.min(cards(14), 1); // straight discriminant: count A as 1 or 14
for (var i = 2; i < 15; i++)
{
cardsofrank[i] = cards(i);
Expand Down

0 comments on commit 9ce578e

Please sign in to comment.