|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReversiPlayerInterface
Interface for a reversi player. Extends Remote
interface to be able to play remotely.
Author: Ondrej Vanek
Date: 10/4/12
Time: 1:11 PM
Method Summary | |
---|---|
void |
endGame()
Signalizes end of the game. |
int |
getEmptySquareColor()
Gets the color of the empty square. |
int |
getMyColor()
Gets the color of the player. |
java.lang.String |
getName()
Returns name of the reversi player. |
int |
getOpponentColor()
Gets the color of the opponent player. |
void |
init(int boardWidth,
int boardHeight,
int myColor,
int opponentColor)
Initializes the player with game parameters. |
ReversiMove |
makeNextMove(int[][] board)
This method is called by the reversi server when the player has to compute the next move. |
Method Detail |
---|
void init(int boardWidth, int boardHeight, int myColor, int opponentColor) throws java.rmi.RemoteException
boardWidth
- WIDTH of the boardboardHeight
- HEIGHT of the boardmyColor
- color of the playeropponentColor
- color of the opponent
java.rmi.RemoteException
int getMyColor() throws java.rmi.RemoteException
java.rmi.RemoteException
int getOpponentColor() throws java.rmi.RemoteException
java.rmi.RemoteException
int getEmptySquareColor() throws java.rmi.RemoteException
java.rmi.RemoteException
java.lang.String getName() throws java.rmi.RemoteException
java.rmi.RemoteException
ReversiMove makeNextMove(int[][] board) throws java.rmi.RemoteException
ReversiMove
class encapsulating the coordinates of the stone to be put on the board.
board
- - contains actual map of the board represented by two-dimensional matrix.
Each sqaure contains number of -1 representing empty square and number 0 and 1 representing players' stones.
java.rmi.RemoteException
void endGame() throws java.rmi.RemoteException
java.rmi.RemoteException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |