java.lang.Object
net.chesstango.gardel.MirrorPositionBuilder<T>
- All Implemented Interfaces:
PositionBuilder<T>
- Author:
- Mauricio Coria
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the chess position representation built by this builder.withBlackBishop(int file, int rank) withBlackKing(int file, int rank) withBlackKnight(int file, int rank) withBlackPawn(int file, int rank) withBlackQueen(int file, int rank) withBlackRook(int file, int rank) withCastlingBlackKingAllowed(boolean castlingBlackKingAllowed) Sets whether castling with the black king is allowed.withCastlingBlackQueenAllowed(boolean castlingBlackQueenAllowed) Sets whether castling with the black queen is allowed.withCastlingWhiteKingAllowed(boolean castlingWhiteKingAllowed) Sets whether castling with the white king is allowed.withCastlingWhiteQueenAllowed(boolean castlingWhiteQueenAllowed) Sets whether castling with the white queen is allowed.withEnPassantSquare(int file, int rank) Sets the en passant square, which indicates the target square of a possible en passant capture.withFullMoveClock(int fullMoveClock) Sets the full-move clock.withHalfMoveClock(int halfMoveClock) Sets the half-move clock.withWhiteBishop(int file, int rank) withWhiteKing(int file, int rank) withWhiteKnight(int file, int rank) withWhitePawn(int file, int rank) withWhiteQueen(int file, int rank) withWhiteRook(int file, int rank) withWhiteTurn(boolean whiteTurn) Sets the turn to indicate whether it is White's turn to move.
-
Constructor Details
-
MirrorPositionBuilder
-
-
Method Details
-
withWhiteTurn
Description copied from interface:PositionBuilderSets the turn to indicate whether it is White's turn to move.- Specified by:
withWhiteTurnin interfacePositionBuilder<T>- Parameters:
whiteTurn- True if it is White's turn to move, false if it is Black's turn.- Returns:
- The current instance of the PositionBuilder.
-
withWhiteKing
- Specified by:
withWhiteKingin interfacePositionBuilder<T>
-
withWhiteQueen
- Specified by:
withWhiteQueenin interfacePositionBuilder<T>
-
withWhiteRook
- Specified by:
withWhiteRookin interfacePositionBuilder<T>
-
withWhiteBishop
- Specified by:
withWhiteBishopin interfacePositionBuilder<T>
-
withWhiteKnight
- Specified by:
withWhiteKnightin interfacePositionBuilder<T>
-
withWhitePawn
- Specified by:
withWhitePawnin interfacePositionBuilder<T>
-
withBlackKing
- Specified by:
withBlackKingin interfacePositionBuilder<T>
-
withBlackQueen
- Specified by:
withBlackQueenin interfacePositionBuilder<T>
-
withBlackRook
- Specified by:
withBlackRookin interfacePositionBuilder<T>
-
withBlackBishop
- Specified by:
withBlackBishopin interfacePositionBuilder<T>
-
withBlackKnight
- Specified by:
withBlackKnightin interfacePositionBuilder<T>
-
withBlackPawn
- Specified by:
withBlackPawnin interfacePositionBuilder<T>
-
withEnPassantSquare
Description copied from interface:PositionBuilderSets the en passant square, which indicates the target square of a possible en passant capture.- Specified by:
withEnPassantSquarein interfacePositionBuilder<T>- Parameters:
file- The file of the en passant square (0-based index).rank- The rank of the en passant square (0-based index).- Returns:
- The current instance of the PositionBuilder.
-
withCastlingWhiteQueenAllowed
Description copied from interface:PositionBuilderSets whether castling with the white queen is allowed.- Specified by:
withCastlingWhiteQueenAllowedin interfacePositionBuilder<T>- Parameters:
castlingWhiteQueenAllowed- True if castling with the white queen is allowed, false otherwise.- Returns:
- The current instance of the PositionBuilder.
-
withCastlingWhiteKingAllowed
Description copied from interface:PositionBuilderSets whether castling with the white king is allowed.- Specified by:
withCastlingWhiteKingAllowedin interfacePositionBuilder<T>- Parameters:
castlingWhiteKingAllowed- True if castling with the white king is allowed, false otherwise.- Returns:
- The current instance of the PositionBuilder.
-
withCastlingBlackQueenAllowed
Description copied from interface:PositionBuilderSets whether castling with the black queen is allowed.- Specified by:
withCastlingBlackQueenAllowedin interfacePositionBuilder<T>- Parameters:
castlingBlackQueenAllowed- True if castling with the black queen is allowed, false otherwise.- Returns:
- The current instance of the PositionBuilder.
-
withCastlingBlackKingAllowed
Description copied from interface:PositionBuilderSets whether castling with the black king is allowed.- Specified by:
withCastlingBlackKingAllowedin interfacePositionBuilder<T>- Parameters:
castlingBlackKingAllowed- True if castling with the black king is allowed, false otherwise.- Returns:
- The current instance of the PositionBuilder.
-
withHalfMoveClock
Description copied from interface:PositionBuilderSets the half-move clock.- Specified by:
withHalfMoveClockin interfacePositionBuilder<T>- Parameters:
halfMoveClock- The number of half-moves since the last capture or pawn move.- Returns:
- The current instance of the PositionBuilder.
-
withFullMoveClock
Description copied from interface:PositionBuilderSets the full-move clock.- Specified by:
withFullMoveClockin interfacePositionBuilder<T>- Parameters:
fullMoveClock- The number of full moves in the game.- Returns:
- The current instance of the PositionBuilder.
-
getPositionRepresentation
Description copied from interface:PositionBuilderGets the chess position representation built by this builder.- Specified by:
getPositionRepresentationin interfacePositionBuilder<T>- Returns:
- The chess representation.
-