Package javachess.decorators
Class PieceDecorator
java.lang.Object
javachess.decorators.PieceDecorator
- Direct Known Subclasses:
BishopDecorator,CastlingDecorator,EnPassantDecorator,KingDecorator,KnightDecorator,PawnDecorator,RookDecorator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
board
-
piece
-
-
Constructor Details
-
PieceDecorator
public PieceDecorator()
-
-
Method Details
-
getValidCells
-
checkValidCell
protected void checkValidCell(Cell cell, Position nextCellPos, BiMap<Position, Cell> cells, ArrayList<Cell> validCells) Check if the next cell is valid and add it to the list of valid cells.- Parameters:
cell- The current cell.nextCellPos- The position of the cell we want to check.cells- The map of cells.validCells- The list of valid cells.
-