Starfish Poker Hand Rankings

There are many, many variations of the game called Poker. The game we will be simulating is our own variation played by an alien race where people have three arms. Below are the "hand rankings" used to determine who wins.

A "starfish poker hand" consists of exactly 5 cards. Even though some games (like this alien version) allows players to have access to more than 5 cards, the hands themselves are always exactly 5 cards. The names of the different hand rankings appear below. Click on one to see its definition.

The rankings below are listed from lowest to highest:

If your hand is so bad that it doesn't qualify for any of the rankings listed above, then there is an even lower ranking:

Note: during a starfish poker game, if the cards you are holding satisfy the description of more than one different ranking, the hand is evaluated by the provided code as the best rank it can find of all the categories for which that hand matches. For example, consider the hand below:

4 of spades  4 of hearts  9 of stars  9 of spades  4 of clubs

The hand does have a pair of nines and a three-of-a-kind of fours but the program that makes use of the PokerHandFinder class you are building will also see the full house and display that in the GUI since it's the best rank the hand can have. The important thing is that while implementing the methods in the PokerHandEvaluator class, you will be return true or false based on whether or not the hand of cards does have the specific type of hand.


Games With More Than Five Cards

In real starfish poker games each player might have access to more than 5 cards by the end, but the hand ranking for a player is found by considering all possible 5-card subsets of the 7 cards available to them and the program then evaluates the hand by determining which 5-card subset has the highest rank. Any program that supports that type of game will handle this; it will simply call your HandEvaluatorSFCP methods sending in one 5-card possible hand at a time and then use appropriate logic from there.

(Back to Project Description)

Web Accessibility