referee
Interface Player

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
HumanPlayer

public interface Player
extends java.rmi.Remote

Title: PlayerInterface

Description: Checkers playing agents must implement this interface.

Copyright: Matt Evett (c) 2004

Company: Eastern Michigan University

Version:
1.0
Author:
Matthew Evett

Method Summary
 int[] getMove(int[] board, boolean isWhite, int movesRemaining)
           
 java.lang.String getName()
           
 

Method Detail

getMove

int[] getMove(int[] board,
              boolean isWhite,
              int movesRemaining)
              throws java.rmi.RemoteException
Parameters:
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 unoccupied
isWhite - is true if the player should make a move for White.
movesRemaining - is the number of moves remaining before a draw is called
Returns:
First element of the array is the position of the piece to be moved. The remaining elements are subsequent positions to which that piece moves. (There will usually be only one remaining element, unless result encodes a multiple capture/jumping move.) Thus a move from position 17 to 10, jumping over an opposition piece at position 14 would be encoded via the array: {17, 10}. It is important that the length of the array be exactly 1+ the number of moves made by the piece.
Throws:
java.rmi.RemoteException

getName

java.lang.String getName()
                         throws java.rmi.RemoteException
Returns:
The name of the player (hopefully something fun!)
Throws:
java.rmi.RemoteException