ictk.boardgame.chess
Class Rook
java.lang.Object
ictk.boardgame.Piece
ictk.boardgame.chess.ChessPiece
ictk.boardgame.chess.Rook
- public class Rook
- extends ChessPiece
Field Summary |
static byte |
INDEX
|
Methods inherited from class ictk.boardgame.chess.ChessPiece |
dump, getBoard, getGuardSquares, getIndex, getLegalDests, getPinnedBy, getSquare, isBishop, isBlack, isBlockable, isCaptured, isGuarding, isGuarding, isKing, isKnight, isLegalAttack, isLegalDest, isPawn, isQueen, removeLegalDests, setBoard, setCaptured, toChessPiece, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INDEX
public static final byte INDEX
- See Also:
- Constant Field Values
Rook
public Rook()
Rook
public Rook(boolean blackness)
Rook
public Rook(boolean blackness,
Square o,
ChessBoard _board)
adjustPinsLegalDests
public void adjustPinsLegalDests(ChessPiece king,
java.util.List enemyTeam)
getLineOfSight
public Square[] getLineOfSight(ChessPiece target,
boolean inclusive)
- Description copied from class:
ChessPiece
- get all the squares between two squares along a line
(diag or straight). Useful for Queens, Rooks and Bishops in
determining legal moves and attacks on the King.
- Overrides:
getLineOfSight
in class ChessPiece
- Parameters:
inclusive
- include the target square in the return set
- Returns:
- squares in line starting with this peice to target
if the squares are not in line then null is returned
getLineOfSight
public Square[] getLineOfSight(Square target,
boolean inclusive)
- Overrides:
getLineOfSight
in class ChessPiece
getLineOfSight
public Square[] getLineOfSight(int t_file,
int t_rank,
boolean inclusive)
- Overrides:
getLineOfSight
in class ChessPiece
isRook
public boolean isRook()
- Overrides:
isRook
in class ChessPiece