http://www.pimp-your-poker.com/rank-poker-hands-royal-flush/

Programming in C + + code question?
Code found in textbooks: trying to calculate just poker hand … Aces are low, consider that just Ace high and without brute-force approach … how could I resolve this problem code to … If this were to separate it better for the Royal Flush code …]? int numInRank [NUMRANKS int numInSuit [NUMSUITS]; for (rank = 0; Rank <NUMRANKS, rank + +) if (numInRank [rank] == 0) numConsec = 0, otherwise NumConsec {+ + if (numConsec == NUMCARDS) {even = true if (rank == NUMRANKS & & flush) royal flush = true;}}
No, it would be better to separate the Royal Flush code. How do you want to be duplicating the code of a NO-NO in C + +. Instead, you should consider what is the difference between a flush and a royal flush, and write only the difference, not duplicating code. Think about it … what makes a flush Royal Flush? — Kasey C, PC Guru since Apple II days give me ambiguity or give me otherwise.
poker lessons: re-evaluate your hand at each street