its meant to be a simple custom variant of poker, my goal here was to program straights lol, i just have it so that the array that contains all the cards is formated such as (Rank) + _ + (Suit) so a full deck would be:
Global.cardsInDeck = [
"2_H", "3_H", "4_H", "5_H", "6_H", "7_H", "8_H", "9_H", "T_H", "J_H", "Q_H", "K_H", "A_H",
"2_S", "3_S", "4_S", "5_S", "6_S", "7_S", "8_S", "9_S", "T_S", "J_S", "Q_S", "K_S", "A_S",
"2_D", "3_D", "4_D", "5_D", "6_D", "7_D", "8_D", "9_D", "T_D", "J_D", "Q_D", "K_D", "A_D",
"2_C", "3_C", "4_C", "5_C", "6_C", "7_C", "8_C", "9_C", "T_C", "J_C", "Q_C", "K_C", "A_C"
]
I need the number sort so i can make it so Tens (T), Jacks (J), Queens (Q), Kings (K) and Aces (A) work
For the hand the person is playing I have another array: Global.currentSelectedCards
Im trying to get check if this array has a hand like [2_H, 3_C, 4_S, 5_D, 6_C] so I can mark it true and use an If statement to determine that that hand is in fact a Straight.