cash_hand_summary.card_1 is the first card on the flop (2 and 3 are the following flop cards, 4 is the turn card and 5 is the river card) and the values of each specific card are summarised
here so:
cash_hand_summary.card_1 = 13 (the first flop card is A
)
The percentage sign is a modulo which returns the remainder of a division so for example 12 divided by 5 would leave a remainder of 2 which would look like:
12 % 5 = 2and since there are 13 cards in each suit % 13 maps each rank of card to a single number - aces are 0, deuces are 1 and so on. So if you wanted to test if the flop contained at least one King you would use:
cash_hand_summary.card_1 % 13 = 12 OR cash_hand_summary.card_2 % 13 = 12 OR cash_hand_summary.card_3 % 13 = 12If you wanted to test for other board textures like K or higher flops then an ace is considered low since it's value after % 13 is 0. Therefore if you wanted to test for K or higher that needs:
cash_hand_summary.card_1 - 1which changes the values of each card by minus 1 so Aces now have a value of 12, Kings 11, e.t.c. which means a King or higher flop looks like this:
(cash_hand_summary.card_1 - 1) % 13 >= 11 OR (cash_hand_summary.card_2 - 1) % 13 >= 11 OR (cash_hand_summary.card_3 - 1) % 13 >= 11