Advertisement
radchukd

Untitled

Mar 27th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1.     for (j = 1; j <= 13; j++) {
  2.         if (p_cards[0][j] + p_cards[1][j] + p_cards[2][j] + p_cards[3][j] == 4)
  3.         { four = true; hvalue[1] = j; } /* Four of a kind */
  4.         if (p_cards[0][j] + p_cards[1][j] + p_cards[2][j] + p_cards[3][j] == 3)
  5.         { three = true; hvalue[1] = j; } /* Three of a kind */
  6.         if (p_cards[0][j] + p_cards[1][j] + p_cards[2][j] + p_cards[3][j] == 2)
  7.         if (p_cards[0][j] + p_cards[1][j] + p_cards[2][j] + p_cards[3][j] == 2) /* Pair Counter */
  8.         { pairs++;
  9.         if (hvalue[1] == 0) { hvalue[1] = j; } else { hvalue[2] = j; }
  10.         if (hvalue[2] == 0) { hvalue[2] = j; }
  11.         }
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement