public class FenChessPosition extends Object implements ChessPosition
| Constructor and Description |
|---|
FenChessPosition(String fen) |
| Modifier and Type | Method and Description |
|---|---|
int |
getHalfMoveClock()
This is the number of halfmoves since the last capture or pawn advance.
|
ChessBoardCoord |
getLastPawnDMove()
If a pawn has just moved two squares ahead, this will be the destination of this pawn.
|
int |
getMoveNumber()
Get the move number.
|
ChessSide |
getNextPlayerTurn()
Get the next player to move.
|
ChessPiece |
getPiece(ChessBoardCoord coordinates)
Get a piece from the board.
|
boolean |
isCastlingAvailable(ChessSide side,
boolean kingside)
Check if castling is available at the current position.
|
public FenChessPosition(String fen)
public int getMoveNumber()
ChessPositiongetMoveNumber in interface ChessPositionpublic int getHalfMoveClock()
ChessPositiongetHalfMoveClock in interface ChessPositionpublic ChessPiece getPiece(ChessBoardCoord coordinates)
ChessPositiongetPiece in interface ChessPositioncoordinates - the piece coordinatespublic boolean isCastlingAvailable(ChessSide side, boolean kingside)
ChessPositionisCastlingAvailable in interface ChessPositionside - which player should we check (may not be the next player of the position)kingside - which castling side ? True for king side, false for queen side.public ChessSide getNextPlayerTurn()
ChessPositiongetNextPlayerTurn in interface ChessPositionpublic ChessBoardCoord getLastPawnDMove()
ChessPositiongetLastPawnDMove in interface ChessPositionCopyright © 2016. All Rights Reserved.