Move

constructor(from: Square, to: Square, promotionChar: Char?)

Secondary constructor for moves with promotion specified as a character.

Parameters

from

The starting square.

to

The destination square.

promotionChar

The character representing the promotion piece type.


constructor(from: String, to: String, promotionPieceType: PieceType? = null)

Secondary constructor for moves specified by string coordinates.

Parameters

from

The starting square in algebraic notation (e.g., "e2").

to

The destination square in algebraic notation (e.g., "e4").

promotionPieceType

The piece type to promote to, if applicable.


constructor(from: Square, to: Square, promotionPieceType: PieceType? = null, isCapture: Boolean = false, isCastlingKingside: Boolean = false, isCastlingQueenside: Boolean = false, isEnPassantCapture: Boolean = false)