Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (woodrow73):

For those who know poker: I'm making a program where the user inputs 2 separate 5 card hands, and the program determines the better hand, or a tie if it is. I just finished doing all the input validation, to check for proper format / input and to make sure there are no duplicate cards. Say one person has a royal flush of hearts: TH JH QH KH AH and the other person has a straight flush: 5S 6S 7S 8S 9S (s = spade, and h = heart) Which hand wins? The first person has the higher straight flush, but the 2nd person has the straight flush of a better suit (spades > hearts).

OpenStudy (woodrow73):

tbh, an answer was nowhere to be found on google.. I suppose because the probability of getting a straight flush is tremendous, nevermind 2 people getting a straight flush on the same hand.

OpenStudy (woodrow73):

Found the answer: In straight flushes, you discount which suit is higher, and always go by the high card:: http://en.wikipedia.org/wiki/List_of_poker_hands

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!