ictk.boardgame.chess
Class Pawn
java.lang.Object
ictk.boardgame.Piece
ictk.boardgame.chess.ChessPiece
ictk.boardgame.chess.Pawn
- public class Pawn
- 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, isKnight, isLegalDest, 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
Pawn
public Pawn()
Pawn
public Pawn(boolean blackness)
Pawn
public Pawn(boolean blackness,
Square o,
ChessBoard _board)
onEnPassantRank
public boolean onEnPassantRank()
- is this pawn on the a possible enpassant rank (not the file).
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
isLegalAttack
public boolean isLegalAttack(Square target)
- Description copied from class:
ChessPiece
- same as isLegalDests except for special moves like castle and
pawn moves.
- Overrides:
isLegalAttack
in class ChessPiece
hasMoved
public boolean hasMoved()
isPromotionSquare
public static boolean isPromotionSquare(Square sq,
boolean isBlack)
- if the pawn reaches this square will it promote.
not sure how useful this function is.
isPawn
public boolean isPawn()
- Overrides:
isPawn
in class ChessPiece