com.anji.roshambo
Class DeanPlayer

java.lang.Object
  extended by com.anji.roshambo.DeanPlayer
All Implemented Interfaces:
RoshamboPlayer, IteratedPlayer, Player

public class DeanPlayer
extends java.lang.Object
implements RoshamboPlayer

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
DeanPlayer()
           
 
Method Summary
 java.lang.String getAuthor()
           
 java.lang.String getPlayerId()
           
 int hashCode()
           
 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 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

DeanPlayer

public DeanPlayer()
Method Detail

getAuthor

public java.lang.String getAuthor()
Specified by:
getAuthor in interface RoshamboPlayer
Returns:
the author's name of this subject.
See Also:
RoshamboPlayer.getAuthor()

reset

public void reset(int trials)
Description copied from interface: RoshamboPlayer
Initialize a new match against an unknown opponent. The length of the match is specified in the paramater "trials". This function is always called before any match is played.

Specified by:
reset in interface RoshamboPlayer
Specified by:
reset in interface IteratedPlayer
Parameters:
trials - number of iterations for current game; player will be reset again before playing another game
See Also:
RoshamboPlayer.reset(int)

storeMove

public void storeMove(int move,
                      int score)
Description copied from interface: RoshamboPlayer
Store the opponent's choice and the outcome of the latest move. This function is called after every move. move is one of ROCK, PAPER, SCISSORS. score is one of DRAW, WIN, LOSS.

Specified by:
storeMove in interface RoshamboPlayer
See Also:
RoshamboPlayer.storeMove(int, int)

nextMove

public int nextMove()
Description copied from interface: RoshamboPlayer
Produce your next move.

Specified by:
nextMove in interface RoshamboPlayer
Returns:
one of ROCK, PAPER, SISSORS
See Also:
RoshamboPlayer.nextMove()

getPlayerId

public java.lang.String getPlayerId()
Specified by:
getPlayerId in interface RoshamboPlayer
Specified by:
getPlayerId in interface Player
Returns:
the name (and version) of this subject.
See Also:
RoshamboPlayer.getPlayerId()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

reset

public void reset()
Description copied from interface: Player
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

Specified by:
reset in interface Player
See Also:
Player.reset()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()