Internet Chess ToolKit
v0.2.0

ictk.boardgame.chess
Class Knight

java.lang.Object
  extended byictk.boardgame.Piece
      extended byictk.boardgame.chess.ChessPiece
          extended byictk.boardgame.chess.Knight

public class Knight
extends ChessPiece


Field Summary
static byte INDEX
           
 
Fields inherited from class ictk.boardgame.chess.ChessPiece
BLACK_OFFSET, NULL_PIECE
 
Constructor Summary
Knight()
           
Knight(boolean blackness)
           
Knight(boolean blackness, Square o, ChessBoard _board)
           
 
Method Summary
 boolean isBlockable(Square target)
           
 boolean isBlockable(Square blocker, ChessPiece target)
          checks to see if another piece may be able to intercede between the piece's origin and destination square
 boolean isKnight()
           
 
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
 

Field Detail

INDEX

public static final byte INDEX
See Also:
Constant Field Values
Constructor Detail

Knight

public Knight()

Knight

public Knight(boolean blackness)

Knight

public Knight(boolean blackness,
              Square o,
              ChessBoard _board)
Method Detail

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 attack
target - - the piece under attack
Returns:
true - the blocker intercedes the attack

isKnight

public boolean isKnight()
Overrides:
isKnight in class ChessPiece

Submit a bug or feature
Visit the Website
Internet Chess ToolKit is licensed under the GPL v2 .