Package javachess.decorators
Class CastlingDecorator
java.lang.Object
javachess.decorators.PieceDecorator
javachess.decorators.CastlingDecorator
-
Field Summary
Fields inherited from class javachess.decorators.PieceDecorator
board, piece -
Constructor Summary
ConstructorsConstructorDescriptionCastlingDecorator(Piece piece, Board board, PieceDecorator pieceDecorator) CastlingDecorator(Piece piece, Board board, PieceDecorator pieceDecorator, PieceType castleWith) -
Method Summary
Modifier and TypeMethodDescriptionGet the valid cells for the castling move (king).Methods inherited from class javachess.decorators.PieceDecorator
checkValidCell
-
Constructor Details
-
CastlingDecorator
public CastlingDecorator(Piece piece, Board board, PieceDecorator pieceDecorator, PieceType castleWith) -
CastlingDecorator
-
-
Method Details
-
getValidCells
Get the valid cells for the castling move (king).- Overrides:
getValidCellsin classPieceDecorator- Returns:
- An ArrayList of valid cells for the castling move.
-