java.lang.Object
app.chess.AbstractChessPiece
app.chess.pieces.Pawn
- All Implemented Interfaces:
Piece
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
void
This function effectively copies all state from another piece.void
Methods inherited from class app.chess.AbstractChessPiece
canParticipateInCastling, getColor, getKind, getPlayer, getPosition, isAlive, toString, wrap
-
Constructor Details
-
Pawn
-
Pawn
-
-
Method Details
-
overwriteState
Description copied from class:AbstractChessPiece
This function effectively copies all state from another piece.
Please, use it with caution under acceptable circumstances.
Passing incompatible pieces might result in an exception.- Overrides:
overwriteState
in classAbstractChessPiece
-
getPotentialMoves
- Specified by:
getPotentialMoves
in classAbstractChessPiece
- Returns:
- A list of ChessMoves that are potentially valid (i.e. the caller needs to check if king's safety is ok and whether path to the given field isn't obstructed
-
move
- Overrides:
move
in classAbstractChessPiece
-
resetMoved
public void resetMoved()- Overrides:
resetMoved
in classAbstractChessPiece
-
enPassantable
public boolean enPassantable()- Overrides:
enPassantable
in classAbstractChessPiece
-