|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.anji.roshambo.CopyingPlayer
public class CopyingPlayer
This subject copies the opponent's move. 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 | |
|---|---|
CopyingPlayer()
default ctor |
|
CopyingPlayer(boolean aStartRandom)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAuthor()
|
java.lang.String |
getPlayerId()
|
int |
hashCode()
|
void |
init(Properties props)
|
int |
nextMove()
Copies opponent's last 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 move,
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 CopyingPlayer()
public CopyingPlayer(boolean aStartRandom)
aStartRandom - | Method Detail |
|---|
public void reset(int trials)
RoshamboPlayer
reset in interface RoshamboPlayerreset in interface IteratedPlayertrials - number of iterations for current game; player will be reset again before
playing another gameRoshamboPlayer.reset(int)public void reset()
Player
reset in interface PlayerPlayer.reset()
public void storeMove(int move,
int score)
RoshamboPlayer
storeMove in interface RoshamboPlayerRoshamboPlayer.storeMove(int, int)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int nextMove()
nextMove in interface RoshamboPlayerRoshamboPlayer.nextMove()public java.lang.String getPlayerId()
getPlayerId in interface RoshamboPlayergetPlayerId in interface PlayerPlayer.getPlayerId()public java.lang.String getAuthor()
getAuthor in interface RoshamboPlayerRoshamboPlayer.getAuthor()
public void init(Properties props)
throws java.lang.Exception
init in interface Configurableprops - configuration parameters
java.lang.ExceptionConfigurable.init(com.anji.util.Properties)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||