public class HumanMancalaPlayer extends java.lang.Object implements MancalaPlayer
HumanMancalaPlayer
- an agent relying entirely
upon human intelligence for decision making through a simple
textModifier and Type | Field and Description |
---|---|
static java.util.Scanner |
scanner
Scanner for reading human input.
|
Constructor and Description |
---|
HumanMancalaPlayer() |
Modifier and Type | Method and Description |
---|---|
int |
chooseMove(MancalaNode node,
long timeRemaining)
Display remaining time, legal moves and query user until legal move
is entered.
|
public int chooseMove(MancalaNode node, long timeRemaining)
chooseMove
in interface MancalaPlayer
node
- a MancalaNode
value - the node to
choose a move fromtimeRemaining
- a long
value - your
entire game time remaining in milliseconds. If your time
runs out, you lose.int
value - the encoding of the
legal move to take at the current node