ictk.boardgame.chess
Class Bishop
java.lang.Object
ictk.boardgame.Piece
ictk.boardgame.chess.ChessPiece
ictk.boardgame.chess.Bishop
- public class Bishop
- extends ChessPiece
the Bishop piece for the game of chess
Field Summary |
static byte |
INDEX
used to indicate what type of piece this is w/o instanceof |
Methods inherited from class ictk.boardgame.chess.ChessPiece |
dump, getBoard, getGuardSquares, getIndex, getLegalDests, getPinnedBy, getSquare, isBlack, isBlockable, isCaptured, isGuarding, isGuarding, isKing, isKnight, isLegalAttack, isLegalDest, isPawn, isQueen, isRook, 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
- used to indicate what type of piece this is w/o instanceof
- See Also:
- Constant Field Values
Bishop
public Bishop()
Bishop
public Bishop(boolean blackness)
Bishop
public Bishop(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
isBishop
public boolean isBishop()
- Overrides:
isBishop
in class ChessPiece