|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the board the game is played on. Some games have more than one board. When this is the case the getLegalMoves() functions will report the legal moves on that board, not legal moves in the game.
Method Summary | |
void |
addBoardListener(BoardListener bl)
add a listener for board updates |
void |
fireBoardEvent(int event)
this is used by controllers (such as History) to fire board events to BoardListeners. |
BoardListener[] |
getBoardListeners()
|
int |
getLegalMoveCount()
returns the number of legal moves possible on the current board. |
java.util.List |
getLegalMoves()
returns a List of all legal moves for the current board state. |
int |
getPlayerToMove()
|
boolean |
isInitialPositionDefault()
Returns true if the very first position on this board is the traditional default position for this type of game; instead of the first position being a position found in the middle of a game. |
boolean |
isLegalMove(Move m)
|
void |
playMove(Move m)
this is a rather short-sighted function. |
void |
removeBoardListener(BoardListener bl)
|
void |
setPositionClear()
clears the board of all pieces. |
void |
setPositionDefault()
sets the board to the default position for the game. |
Method Detail |
public void setPositionDefault()
public boolean isInitialPositionDefault()
public void setPositionClear()
public java.util.List getLegalMoves()
public int getLegalMoveCount()
public boolean isLegalMove(Move m)
public int getPlayerToMove()
public void playMove(Move m) throws IllegalMoveException, OutOfTurnException
IllegalMoveException
OutOfTurnException
public void addBoardListener(BoardListener bl)
public void removeBoardListener(BoardListener bl)
public BoardListener[] getBoardListeners()
public void fireBoardEvent(int event)
event
- the BoardEvent.
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |