Kokopu - v4.13.0
    Preparing search index...

    Class MoveDescriptorAbstract

    Describe a legal chess move, with its characteristics.

    Index

    Methods

    • Color and type of the captured piece.

      Returns
          | "br"
          | "bb"
          | "bp"
          | "bq"
          | "bk"
          | "bn"
          | "wr"
          | "wb"
          | "wp"
          | "wq"
          | "wk"
          | "wn"

      exception.IllegalArgument if the current move is not a capture, i.e. if isCapture returns false.

    • Color of the moving piece.

      Returns Color

    • Color and type of the promoted piece, in case of a promotion.

      Returns
          | "br"
          | "bb"
          | "bp"
          | "bq"
          | "bk"
          | "bn"
          | "wr"
          | "wb"
          | "wp"
          | "wq"
          | "wk"
          | "wn"

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

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

      Returns
          | "h1"
          | "h2"
          | "h3"
          | "h4"
          | "h5"
          | "h6"
          | "d1"
          | "d2"
          | "d3"
          | "d4"
          | "d5"
          | "d6"
          | "d7"
          | "d8"
          | "a1"
          | "a2"
          | "a3"
          | "a4"
          | "a5"
          | "a6"
          | "a7"
          | "a8"
          | "b1"
          | "b2"
          | "b3"
          | "b4"
          | "b5"
          | "b6"
          | "b7"
          | "b8"
          | "g1"
          | "g2"
          | "g3"
          | "g4"
          | "g5"
          | "g6"
          | "g7"
          | "g8"
          | "c1"
          | "c2"
          | "c3"
          | "c4"
          | "c5"
          | "c6"
          | "c7"
          | "c8"
          | "e1"
          | "e2"
          | "e3"
          | "e4"
          | "e5"
          | "e6"
          | "e7"
          | "e8"
          | "f1"
          | "f2"
          | "f3"
          | "f4"
          | "f5"
          | "f6"
          | "f7"
          | "f8"
          | "h7"
          | "h8"

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

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

      Returns
          | "h1"
          | "h2"
          | "h3"
          | "h4"
          | "h5"
          | "h6"
          | "d1"
          | "d2"
          | "d3"
          | "d4"
          | "d5"
          | "d6"
          | "d7"
          | "d8"
          | "a1"
          | "a2"
          | "a3"
          | "a4"
          | "a5"
          | "a6"
          | "a7"
          | "a8"
          | "b1"
          | "b2"
          | "b3"
          | "b4"
          | "b5"
          | "b6"
          | "b7"
          | "b8"
          | "g1"
          | "g2"
          | "g3"
          | "g4"
          | "g5"
          | "g6"
          | "g7"
          | "g8"
          | "c1"
          | "c2"
          | "c3"
          | "c4"
          | "c5"
          | "c6"
          | "c7"
          | "c8"
          | "e1"
          | "e2"
          | "e3"
          | "e4"
          | "e5"
          | "e6"
          | "e7"
          | "e8"
          | "f1"
          | "f2"
          | "f3"
          | "f4"
          | "f5"
          | "f6"
          | "f7"
          | "f8"
          | "h7"
          | "h8"

    • 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
          | "br"
          | "bb"
          | "bp"
          | "bq"
          | "bk"
          | "bn"
          | "wr"
          | "wb"
          | "wp"
          | "wq"
          | "wk"
          | "wn"

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

      Returns Piece

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

      Returns
          | "h1"
          | "h2"
          | "h3"
          | "h4"
          | "h5"
          | "h6"
          | "d1"
          | "d2"
          | "d3"
          | "d4"
          | "d5"
          | "d6"
          | "d7"
          | "d8"
          | "a1"
          | "a2"
          | "a3"
          | "a4"
          | "a5"
          | "a6"
          | "a7"
          | "a8"
          | "b1"
          | "b2"
          | "b3"
          | "b4"
          | "b5"
          | "b6"
          | "b7"
          | "b8"
          | "g1"
          | "g2"
          | "g3"
          | "g4"
          | "g5"
          | "g6"
          | "g7"
          | "g8"
          | "c1"
          | "c2"
          | "c3"
          | "c4"
          | "c5"
          | "c6"
          | "c7"
          | "c8"
          | "e1"
          | "e2"
          | "e3"
          | "e4"
          | "e5"
          | "e6"
          | "e7"
          | "e8"
          | "f1"
          | "f2"
          | "f3"
          | "f4"
          | "f5"
          | "f6"
          | "f7"
          | "f8"
          | "h7"
          | "h8"

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

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

      Returns
          | "h1"
          | "h2"
          | "h3"
          | "h4"
          | "h5"
          | "h6"
          | "d1"
          | "d2"
          | "d3"
          | "d4"
          | "d5"
          | "d6"
          | "d7"
          | "d8"
          | "a1"
          | "a2"
          | "a3"
          | "a4"
          | "a5"
          | "a6"
          | "a7"
          | "a8"
          | "b1"
          | "b2"
          | "b3"
          | "b4"
          | "b5"
          | "b6"
          | "b7"
          | "b8"
          | "g1"
          | "g2"
          | "g3"
          | "g4"
          | "g5"
          | "g6"
          | "g7"
          | "g8"
          | "c1"
          | "c2"
          | "c3"
          | "c4"
          | "c5"
          | "c6"
          | "c7"
          | "c8"
          | "e1"
          | "e2"
          | "e3"
          | "e4"
          | "e5"
          | "e6"
          | "e7"
          | "e8"
          | "f1"
          | "f2"
          | "f3"
          | "f4"
          | "f5"
          | "f6"
          | "f7"
          | "f8"
          | "h7"
          | "h8"

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

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

      Returns
          | "h1"
          | "h2"
          | "h3"
          | "h4"
          | "h5"
          | "h6"
          | "d1"
          | "d2"
          | "d3"
          | "d4"
          | "d5"
          | "d6"
          | "d7"
          | "d8"
          | "a1"
          | "a2"
          | "a3"
          | "a4"
          | "a5"
          | "a6"
          | "a7"
          | "a8"
          | "b1"
          | "b2"
          | "b3"
          | "b4"
          | "b5"
          | "b6"
          | "b7"
          | "b8"
          | "g1"
          | "g2"
          | "g3"
          | "g4"
          | "g5"
          | "g6"
          | "g7"
          | "g8"
          | "c1"
          | "c2"
          | "c3"
          | "c4"
          | "c5"
          | "c6"
          | "c7"
          | "c8"
          | "e1"
          | "e2"
          | "e3"
          | "e4"
          | "e5"
          | "e6"
          | "e7"
          | "e8"
          | "f1"
          | "f2"
          | "f3"
          | "f4"
          | "f5"
          | "f6"
          | "f7"
          | "f8"
          | "h7"
          | "h8"