public interface Player
extends java.rmi.Remote
Title: PlayerInterface
Description: Checkers playing agents must implement this interface.
Copyright: Matthew Evett (c) 2014
Company: Eastern Michigan University
Modifier and Type | Method and Description |
---|---|
int[] |
getMove(int[] board,
boolean isWhite,
int movesRemaining) |
java.lang.String |
getName() |
int[] getMove(int[] board, boolean isWhite, int movesRemaining) throws java.rmi.RemoteException
board
- --- The board is encoded as a 33 integer array.
board[0] is unused. For i from 1 to 32, board[i] indicates what piece, if any
is position i on the board, using the official checkers numbering
scheme. board[i] = -2 for a black king, -1 for a black pawn, 1 for a white pawn,
2 for a white king, and is 0 if the position is unoccupiedisWhite
- is true if the player should make a move for White.movesRemaining
- is the number of moves remaining before a draw is calledjava.rmi.RemoteException
java.lang.String getName() throws java.rmi.RemoteException
java.rmi.RemoteException