public class DoubleBonus extends PokerRules implements PlayVariant
| Modifier and Type | Field and Description |
|---|---|
private static java.util.HashMap<java.lang.String,java.lang.Integer[]> |
scoreBoard |
private java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
statistics |
| Constructor and Description |
|---|
DoubleBonus()
Creates a double bonus variant, which, in this case, means only initialize the statistics
since they are the only non static attributes of this class
|
| Modifier and Type | Method and Description |
|---|---|
int[] |
advice(Card[] cards)
Implements the strategy for this variant of Poker.
|
private static java.util.HashMap<java.lang.String,java.lang.Integer[]> |
createScoreBoard() |
java.lang.String |
evaluateHand(Card[] cards)
Returns the name of the awarded hand if it exists, otherwise returns null
|
private static java.util.ArrayList<Card[]> |
getListOfDebugHands()
Only exist for debug purposes.
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getStats()
Shows the statistics of awarded (or not) hands hit until now
|
int |
getValueOfHand(java.lang.String nameOfHand,
int bettedCredits)
Retrieves the prize for a given awarded hand
|
private void |
initializeStatistics()
Method that initializes the statistics
|
computeCandidateStraights, computeSameRank, computeSameSuit, getHighCards, getIntFromList, intersect, isAce, isAKQJUnsuited, isFlush, isFourOfAKind, isFourToAFlush, isFourToAnInsideStraightWithNHighCards, isFourToAnInsideStraightWithNoHighCards, isFourToAnInsideStraightWithOneHighCard, isFourToAnInsideStraightWithThreeHighCards, isFourToAnInsideStraightWithTwoHighCards, isFourToAnOutsideStraight, isFourToAStraightFlush, isFourToRoyalFlush, isFullHouse, isHighPair, isJackOrQueenOrKing, isJTSuited, isKJUnsuited, isKQJUnsuited, isKQUnsuited, isKTSuited, isLowPair, isNOfAKind, isNToARoyalFlush, isQJSuited, isQJUnsuited, isQTSuited, isRoyalFlush, isStraight, isStraightFlush, isThreeAces, isThreeOfAKind, isThreeToAFlushWithNHighCards, isThreeToAFlushWithNoHighCards, isThreeToAFlushWithOneHighCard, isThreeToAFlushWithTwoHighCards, isThreeToARoyalFlush, isThreeToAStraightFlushTypeOne, isThreeToAStraightFlushTypeThree, isThreeToAStraightFlushTypeTwo, isTwoPair, isTwoSuitedHighCards, populateWithComutationsprivate static final java.util.HashMap<java.lang.String,java.lang.Integer[]> scoreBoard
private java.util.LinkedHashMap<java.lang.String,java.lang.Integer> statistics
public DoubleBonus()
private static java.util.HashMap<java.lang.String,java.lang.Integer[]> createScoreBoard()
private void initializeStatistics()
public int[] advice(Card[] cards)
advice in interface PlayVariantadvice in class PokerRulescards - Sequence of cards to be evaluated. They come in number of 5public java.lang.String evaluateHand(Card[] cards)
evaluateHand in interface PlayVariantevaluateHand in class PokerRulescards - Vector of cards (in number of 5) that are to be consideredpublic java.util.HashMap<java.lang.String,java.lang.Integer> getStats()
getStats in interface PlayVariantprivate static java.util.ArrayList<Card[]> getListOfDebugHands()
public int getValueOfHand(java.lang.String nameOfHand,
int bettedCredits)
getValueOfHand in interface PlayVariantnameOfHand - Names the awarded handbettedCredits - Amount of credits that where bet before getting this hand