public class PokerSquaresPointSystem
extends java.lang.Object
Constructor and Description |
---|
PokerSquaresPointSystem(int[] scores)
Create a point system given an array of hand scores.
|
Modifier and Type | Method and Description |
---|---|
static PokerSquaresPointSystem |
getAmericanPointSystem()
Return the American point system.
|
static PokerSquaresPointSystem |
getAmeritishPointSystem()
Return an "Ameritish" point system randomly generated between the normalized point ranges established by the American and British systems.
|
static PokerSquaresPointSystem |
getBritishPointSystem()
Return the British point system.
|
int |
getHandScore(Card[] hand)
Get the score of the given Card hand (which may contain null values).
|
int |
getHandScore(int pokerHandId)
Get the score associated with the given Poker hand classification identification number.
|
int |
getHandScore(PokerHand pokerHand)
Get the score associated with the given Poker hand classification.
|
int[] |
getHandScores(Card[][] grid)
Get an int array with the individual hand scores of rows 0 through 4 followed by columns 0 through 4.
|
static PokerSquaresPointSystem |
getHypercornerPointSystem()
Return a random hypercorner point system where hand scores are either -1 or 1 with equal probability.
|
static PokerSquaresPointSystem |
getRandomPointSystem()
Return a random point system with scores uniformly distributed across the range of all allowable values.
|
int |
getScore(Card[][] grid)
Get the score of the given Card grid.
|
int[] |
getScoreTable()
Return an array of scores indexed by Poker hand classification identification numbers.
|
static PokerSquaresPointSystem |
getSingleHandPointSystem()
Return a point system where only one randomly selected Poker hand scores 1 point.
|
static PokerSquaresPointSystem |
getSingleHandPointSystem(int pokerHandId)
Return a point system where only the one Poker hand (given by Poker hand classification identification number)
scores 1 point.
|
static void |
main(java.lang.String[] args)
Demonstrate the different point systems that may be generated.
|
void |
printGrid(Card[][] grid)
Print the given game grid and score.
|
static void |
setSeed(long seed)
Set the seed of the game pseudorandom number generator.
|
java.lang.String |
toString() |
public PokerSquaresPointSystem(int[] scores)
scores
- given hand scorespublic int getHandScore(Card[] hand)
hand
- Card handpublic int getHandScore(PokerHand pokerHand)
pokerHand
- Poker hand classificationpublic int getHandScore(int pokerHandId)
pokerHandId
- Poker hand classification identification numberpublic int[] getScoreTable()
public int getScore(Card[][] grid)
grid
- Card gridpublic int[] getHandScores(Card[][] grid)
grid
- 2D Card array representing play gridpublic static void setSeed(long seed)
seed
- pseudorandom number generator seedpublic static PokerSquaresPointSystem getRandomPointSystem()
public static PokerSquaresPointSystem getHypercornerPointSystem()
public static PokerSquaresPointSystem getSingleHandPointSystem(int pokerHandId)
pokerHandId
- Poker hand classification identification numberpublic static PokerSquaresPointSystem getSingleHandPointSystem()
public static PokerSquaresPointSystem getAmericanPointSystem()
public static PokerSquaresPointSystem getBritishPointSystem()
public static PokerSquaresPointSystem getAmeritishPointSystem()
public void printGrid(Card[][] grid)
grid
- given game gridpublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- (not used)