public class RandomPlayer extends java.lang.Object implements PokerSquaresPlayer
Constructor and Description |
---|
RandomPlayer() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
getName - gets the uniquely identifying name of the Poker Squares player.
|
int[] |
getPlay(Card card,
long millisRemaining)
getPlay - gets the current play position for a given card within the allotted number of milliseconds.
|
void |
init()
init - initializes the player before each game
|
static void |
main(java.lang.String[] args)
Demonstrate RandomPlayer play with Ameritish point system.
|
void |
setPointSystem(PokerSquaresPointSystem system,
long millis)
setScoreSystem - provides the player with the point system that will be used in subsequent games
until a new point system is specified by the same method.
|
public void setPointSystem(PokerSquaresPointSystem system, long millis)
PokerSquaresPlayer
millis
. After the given number of milliseconds, or after the player returns
from this method, the player should be ready to play. It is permissible to perform such computation
on a separate thread, but the player should be able to play immediately after the return from this
method or after the allotted time, whichever comes first.setPointSystem
in interface PokerSquaresPlayer
system
- - new score systemmillis
- - number of milliseconds allotted for player processing of the new point systempublic void init()
PokerSquaresPlayer
init
in interface PokerSquaresPlayer
public int[] getPlay(Card card, long millisRemaining)
PokerSquaresPlayer
getPlay
in interface PokerSquaresPlayer
card
- - card just drawn.millisRemaining
- - remaining milliseconds for play in the rest of the player's game.public java.lang.String getName()
PokerSquaresPlayer
getName
in interface PokerSquaresPlayer
public static void main(java.lang.String[] args)
args
- (not used)