public class HumanMancalaPlayer extends java.lang.Object implements MancalaPlayer
HumanMancalaPlayer - an agent relying entirely
upon human intelligence for decision making through a simple
text| Modifier 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 MancalaPlayernode - 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