hi everyone
i'm new in programing, so don't judge me if i will say something stupid...
i'm trying to write i poker game in C++ but have faced with several problems, the first one is how to determine a winner...
for example i player hand is:
Ace of spades card number is: 39
Four of spades 42
Six of spades 44
Ace of diamonds 0
King of diamonds 12
dealer:
Four of diamonds 3
three of spades 41
Seven of hearts 19
three of hearts 15
Five of diamonds 4
how to determine that player wins...? i could write down all combination... but there is thousands of them...
Renas
0
Newbie Poster
Recommended Answers
Jump to PostYou need to write a couple of hand scoring functions. You don't look for all possible combinations, but look at a player's hand and determine what, if any, of the poker hands it constitutes.
In evaluating a hand, you need to look at first the value of the cards, …
All 4 Replies
vmanes
1,165
Posting Virtuoso
DemonGal711
8
Junior Poster
Clinton Portis
211
Practically a Posting Shark
Clinton Portis
211
Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.