ictk.boardgame.chess
Class Knight
java.lang.Object
ictk.boardgame.Piece
ictk.boardgame.chess.ChessPiece
ictk.boardgame.chess.Knight
- public class Knight
- extends ChessPiece
Field Summary |
static byte |
INDEX
|
Methods inherited from class ictk.boardgame.chess.ChessPiece |
dump, getBoard, getGuardSquares, getIndex, getLegalDests, getLineOfSight, getLineOfSight, getLineOfSight, getPinnedBy, getSquare, isBishop, isBlack, isCaptured, isGuarding, isGuarding, isKing, 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
- See Also:
- Constant Field Values
Knight
public Knight()
Knight
public Knight(boolean blackness)
Knight
public Knight(boolean blackness,
Square o,
ChessBoard _board)
isBlockable
public boolean isBlockable(Square target)
isBlockable
public boolean isBlockable(Square blocker,
ChessPiece target)
- Description copied from class:
ChessPiece
- checks to see if another piece may be able to intercede between the
piece's origin and destination square
- Overrides:
isBlockable
in class ChessPiece
- Parameters:
blocker
- - the proposed square that can block the attacktarget
- - the piece under attack
- Returns:
- true - the blocker intercedes the attack
isKnight
public boolean isKnight()
- Overrides:
isKnight
in class ChessPiece