Your Questions About Poker Hands

Donald asks…

How do I check for poker hands in Java?

If i have 5 cards with rank and suit how do I check for different poker hands in java i.e. straights, flushes, etc? I’m not looking for code, just a way to do it. thanks!

admin answers:

There won’t be any trick to it. You will have a series of methods, each one taking an array of 5 cards and returning a boolean. One for each kind of hand you are trying to detect. Then the code within each method must just do the appropriate checks. It will be somewhat detail-oriented but I don’t see a way around it.

For example:

isPair – look at each card and see if there is another in the hand of the same rank

isThreeOfAKind – similar to isPair but must find two other cards with the same rank as each chosen card

isFlush – take the first card, note its suit, then check that the other four cards have that same suit.

IsStraight – find the lowest card, then check that among the other four cards there is a card with each of: one higher rank, two higher rank, three higher rank, and four higher rank. With Aces being either low or high there will be some additional work in this method to accommodate that.

IsStraightFlush – could be implemented by calling isStraight and isFlush and only returning true if those are both true

isRoyalFlush – first check for isStraightFlush then check that the lowest card has rank 10.

You get the idea.

One detail to consider is whether you want to consider three-of-a-kind as a pair, since technically there are two cards with the same rank. If not, then the code for IsPair will have to also call isThreeOfAKind (and isFourOfAKind) and not return true if any of those are true.

Wild cards will complicate these methods of course. Then they will need a way of knowing what is wild as they look at the cards to see if they meet the requirements of the kind of hand they are checking for.

Jenny asks…

How many 5-card poker hands consisting of three 3’s and two cards that are not 3’s are possible in a 52 card d?

How many 5-card poker hands consisting of three 3’s and two cards that are not 3’s are possible in a 52-card deck?

A.- 2256
B.- 2652
C.- 5304
D.- 4512

admin answers:

= 4C3 * 48C2
= 4512, option D.

George asks…

How do you calculate the odds of poker hands? (please read details)?

I know how to FIND the odds of certain poker hands, but I need to know how to CALCULATE these odds because I am creating a new card game that does not use a full deck of cards….. Any math freaks out there that can get me in the right direction?

admin answers:

Odds of anything are calculated using probability. Probability is an entire branch of mathematics that requires a lot of math knowledge. For example check out this page for some ideas on calculating odds in poker:

Lizzie asks…

What poker hands beat others and what are the nicknames for the different hands?

I know the order of the hands which beat other hands, but could someone explain to me what some common nicknames for each hand can be? Additionally, perhaps explain what the odds of something happening each hand are?

admin answers:


Wikipedia seems to be a pretty comprehensive poker resource.

Chris asks…

How many poker hands are necessary to produce accurate results that eliminate variance?

According to my pokertracker I am beating the level i am at by 2.5 bb/100 hands. This result is based on about 3500 hands, is this enough hands played to show my results without any variance.

admin answers:

Most people would say a minimum sample should be at least 100,000 hands to reduce variance. Check out some poker forums like 2+2 or fulltiltpoker forum. You will find a lot of threads on that topic

Powered by Yahoo! Answers

Comments are closed.

Poker Odds Calculator TournamentIndicator located at Am Pokertisch 1 , Deutschland, BY . Reviewed by 11 Pokerexperten rated: 4.7 / 5