Class MoveDescriptorAbstract

Describe a legal chess move, with its characteristics.

Hierarchy

  • MoveDescriptor

Methods

  • Color of the moving piece.

    Returns Color

  • Square containing the captured pawn, in case of a en-passant capture.

    Throws

    IllegalArgument if the current move is not a en-passant capture, i.e. if isEnPassant returns false.

    Returns Square

  • Origin square of the moving piece. In case of castling, this is the origin square of the king.

    Returns Square

  • Whether the current move is a capture (either a regular capture or a en-passant capture) or not.

    Returns boolean

  • Whether the current move is a castling move or not.

    Returns boolean

  • Whether the current move is a en-passant capture or not.

    Returns boolean

  • Whether the current move is a promotion or not.

    Returns boolean

  • Color and type of the moving piece. In case of castling, the moving piece is considered to be the king.

    Returns ColoredPiece

  • Type of the moving piece. In case of castling, the moving piece is considered to be the king.

    Returns Piece

  • Type of the promoted piece, in case of a promotion.

    Throws

    IllegalArgument if the current move is not a promotion, i.e. if isPromotion returns false.

    Returns Piece

  • Origin square of the rook, in case of a castling move.

    Throws

    IllegalArgument if the current move is not a castling move, i.e. if isCastling returns false.

    Returns Square

  • Destination square of the rook, in case of a castling move.

    Throws

    IllegalArgument if the current move is not a castling move, i.e. if isCastling returns false.

    Returns Square

  • Destination square of the moving piece. In case of castling, this is the destination square of the king.

    Returns Square

Generated using TypeDoc