i am making a card game(texas hold em) and so far this is what i have:
creates a deck with all the suits and values(52 cards) and is stored in an array.
picks cards at random and deals each player(9) two cards, also stored in an array.
picks five community cards at random and stores them into an array.
now this is the part where i am having a bit of trouble. finding the ranks of the hands. now all the suits and values are stored as integers like this:
values(on the left is the stored number and on the right is what it represents):
0=ace
1=2
2=3
3=4
4=5
5=6
6=7
7=8
8=9
9=10
10=J
11=Q
12=K
suits:
0=club
1=diamond
2=spade
3=heart
a player may use 5 of the 7 cards to make up their hand. im not quite sure how to go about checking for this. a sample array of the community cards plus the players cards would look something like this:
4 9 2 12 11 4 8
if someone could point me in the right direction of give me a sample on how to do it i would appreciate it. thanks.