|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.anji.roshambo.RotatingPlayer
public class RotatingPlayer
This subject rotates Rock Paper Sissors. http://www.cs.unimaas.nl/~donkers/games/roshambo03/
Field Summary |
---|
Fields inherited from interface com.anji.roshambo.RoshamboPlayer |
---|
DRAW, LOSS, PAPER, ROCK, SCISSORS, WIN |
Constructor Summary | |
---|---|
RotatingPlayer()
default ctor |
|
RotatingPlayer(boolean aStartRandom)
|
Method Summary | |
---|---|
java.lang.String |
getAuthor()
|
java.lang.String |
getPlayerId()
|
int |
hashCode()
|
void |
init(Properties props)
|
int |
nextMove()
Produce your next move. |
void |
reset()
reset player state; after a call to reset, the player should be in the same state as it was when created; i.e., it has no memory of previous games played |
void |
reset(int trials)
Initialize a new match against an unknown opponent. |
void |
storeMove(int aMove,
int score)
Store the opponent's choice and the outcome of the latest move. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RotatingPlayer()
public RotatingPlayer(boolean aStartRandom)
aStartRandom
- Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public void reset()
Player
reset
in interface Player
Player.reset()
public void reset(int trials)
RoshamboPlayer
reset
in interface RoshamboPlayer
reset
in interface IteratedPlayer
trials
- number of iterations for current game; player will be reset again before
playing another gameRoshamboPlayer.reset(int)
public void storeMove(int aMove, int score)
RoshamboPlayer
storeMove
in interface RoshamboPlayer
RoshamboPlayer.storeMove(int, int)
public int nextMove()
RoshamboPlayer
nextMove
in interface RoshamboPlayer
RoshamboPlayer.nextMove()
public java.lang.String getPlayerId()
getPlayerId
in interface RoshamboPlayer
getPlayerId
in interface Player
Player.getPlayerId()
public java.lang.String getAuthor()
getAuthor
in interface RoshamboPlayer
RoshamboPlayer.getAuthor()
public void init(Properties props) throws java.lang.Exception
init
in interface Configurable
props
- configuration parameters
java.lang.Exception
Configurable.init(com.anji.util.Properties)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |