public class PokerSquares
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
GAME_MILLIS |
static long |
POINT_SYSTEM_MILLIS |
static int |
SIZE |
Constructor and Description |
---|
PokerSquares(PokerSquaresPlayer player,
PokerSquaresPointSystem system)
Create a PokerSquares game with a given player and point system.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Demonstrate single/batch game play testing and tournament evaluation of PokerSquaresPlayers.
|
int |
play()
Play a game of Poker Squares and return the final game score.
|
int |
play(java.util.Scanner in)
Given two-character card inputs from the given Scanner, play a game of Poker Squares and return the final
game score.
|
int[] |
playSequence(int numGames,
long startSeed,
boolean verbose)
Play a sequence of games, collecting and reporting statistics.
|
static double[] |
playTournament(java.util.ArrayList<PokerSquaresPlayer> players,
java.util.ArrayList<PokerSquaresPointSystem> systems,
int gamesPerSystem,
long startSeed)
Hold a Poker Squares tournament between the given players and point systems, the number of games played by
each player with each point system, and the start seed determining the sequence of deals all will encounter,
returning an array of doubles corresponding to the tournament score of each player.
|
public static final int SIZE
public static final long POINT_SYSTEM_MILLIS
public static final long GAME_MILLIS
public PokerSquares(PokerSquaresPlayer player, PokerSquaresPointSystem system)
player
- Poker Squares player objectsystem
- current Poker Squares point systempublic int play()
public int play(java.util.Scanner in)
in
- Scanner object from which two-character card inputs will be readpublic int[] playSequence(int numGames, long startSeed, boolean verbose)
numGames
- number of games to playstartSeed
- seed of first game. Successive games use successive seedsverbose
- whether or not to provide verbose output of game playpublic static double[] playTournament(java.util.ArrayList<PokerSquaresPlayer> players, java.util.ArrayList<PokerSquaresPointSystem> systems, int gamesPerSystem, long startSeed)
players
- Poker Squares players taking part in the tournamentsystems
- Poker Squares point systems used to evaluate players in the tournamentgamesPerSystem
- the number of games that will be played by each player with each point systemstartSeed
- the start seed for the pseudorandom number generator that generates card dealspublic static void main(java.lang.String[] args)
args
- (not used)