heurgame.analysis
Class MoveAnalyzer

java.lang.Object
  extended byheurgame.analysis.MoveAnalyzer

public abstract class MoveAnalyzer
extends java.lang.Object

Author:
David Kaplin The role of the MoveAnalyzer is to separate some of the logic for validating individual moves in a game. In some cases this might not be possible, so communication between the MoveAnalyzer and the SystemAnalyzer is encouraged. The Referee works closely with the MoveAnalyzer each turn.

Field Summary
static java.lang.String MOVE_DISQUALIFIED
          MOVE_DISQUALIFIED The start of a response that is the reason for a players ejection.
static java.lang.String MOVE_INVALID
          MOVE_INVALID The start of a rejection of the move.
static java.lang.String MOVE_VALID
          MOVE_VALID A Valid and accepted Move.
protected  SystemAnalyzer parent
          parent Delegated to for checking for duplicates and other minutia.
 
Constructor Summary
MoveAnalyzer()
           
 
Method Summary
abstract  java.lang.String evaluateMove(java.lang.String move, PlayerToken senderToken, long timeTaken)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MOVE_VALID

public static final java.lang.String MOVE_VALID
MOVE_VALID A Valid and accepted Move.

See Also:
Constant Field Values

MOVE_DISQUALIFIED

public static final java.lang.String MOVE_DISQUALIFIED
MOVE_DISQUALIFIED The start of a response that is the reason for a players ejection.

See Also:
Constant Field Values

MOVE_INVALID

public static final java.lang.String MOVE_INVALID
MOVE_INVALID The start of a rejection of the move.

See Also:
Constant Field Values

parent

protected SystemAnalyzer parent
parent Delegated to for checking for duplicates and other minutia.

Constructor Detail

MoveAnalyzer

public MoveAnalyzer()
Method Detail

evaluateMove

public abstract java.lang.String evaluateMove(java.lang.String move,
                                              PlayerToken senderToken,
                                              long timeTaken)
Parameters:
move - Game specific string about the move the player made
senderToken - The player involved with the move
timeTaken - Time to get the move from the player
Returns:
A string either begining with MOVE_VALID for valid moves or a string beginning with MOVE_INVALID for all other cases.