This game is similar to Earth Blackjack, but with slightly different
rules. The goal is still to get as close to 21 without going over as
possible. There are some special rules.
(1) The program spec says that the
eval method in the HandEvaluatorPatrickjack class needs to evaluate
the value of any hand that goes "over" as being 0.
(2) If you have only two cards in your hand and they are a 7 and a 2 (order
doesn't matter) you have Patrickjack! This beats anything other than
another Patrickjack. To support this, the program spec says that the
eval method in the HandEvaluatorPatrickjack class needs to evaluate
the value of this hand as a 22. It's not "over 21" but rather a special
way to note it's better than a 21.
(3) If you have only two cards in your hand and they are a 6 and a 9 (order
doesn't matter) you have a Margiejack, which has the value 21.
(4) If any of your cards are a 5, each can be treated as either a 5 or
a 15 depending on which is better for you. Note that if you had two
cards that were a 5, you wouldn't want BOTH treated as 15 since then
you'd be over and would lose.
In terms of the
houseWins method,
the winning hand is the higher hand that has not exceeded 21 points.
For the house to win, the dealer (representing the house) has to have
the higher hand.
For this game, a Patrickjack is considered as being higher than a 21 total
using more than two cards.
In the case of a tie, the player wins.
So, for example, a Patrickjack against a Margiejack has the Patrickjack
win and a Margiejack against a 9+4+8 is a tie.
Also, please note that an Ace always counts as a "1" in this game.