I have a deck of shuffled cards and the hand is dealt. How can I work out what the players hand is? eg High Card, Flush, Pair etc...
I never really thought that THIS would be so hard. (Or maybe it's just too late for me to be coding).
The following is just snippets of my code, there is no logic here.
Code:
struct CARDS{
char suit; // ASCII symbols for heart,diamond,club or spade.
int number; // 0 - 12
char face; // number A,2,3...J,Q,K
};
struct PLAYER{
char name[15];
int money;
struct CARDS phand[5];
};
struct PLAYER player;
struct CARDS deck[52];
player.phand[0];
player.phand[1];
player.phand[2];
player.phand[3];
player.phand[4];
[edit]
I think I might have an idea now but havent had time to implement anything yet, so any suggestions would be helpful.
[/edit]