Class HumanMancalaPlayer

java.lang.Object
  |
  +--HumanMancalaPlayer
All Implemented Interfaces:
MancalaPlayer

public class HumanMancalaPlayer
extends java.lang.Object
implements MancalaPlayer

HumanMancalaPlayer - an agent relying entirely upon human intelligence for decision making through a simple text


Field Summary
 java.io.BufferedReader reader
           
 
Constructor Summary
HumanMancalaPlayer()
          HumanMancalaPlayer constructor.
 
Method Summary
 int chooseMove(MancalaNode node, long timeRemaining)
          Display remaining time, legal moves and query user until legal move is entered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

public java.io.BufferedReader reader
Constructor Detail

HumanMancalaPlayer

public HumanMancalaPlayer()
HumanMancalaPlayer constructor.
Method Detail

chooseMove

public int chooseMove(MancalaNode node,
                      long timeRemaining)
Display remaining time, legal moves and query user until legal move is entered.
Specified by:
chooseMove in interface MancalaPlayer
Following copied from interface: MancalaPlayer
Parameters:
node - a MancalaNode value - the node to choose a move from
timeRemaining - a long value - your entire game time remaining in milliseconds. If your time runs out, you lose.
Returns:
an int value - the encoding of the legal move to take at the current node