moveOf

fun moveOf(origin: Int, target: Int): Move

Creates a Move object from the specified origin and target squares (using Int as the squares types).

Return

the corresponding Move for origin and target squares

Since

1.0.0-beta.1

Author

lunalobos

Parameters

origin

the origin square as an Int

target

the target square as an Int


fun moveOf(origin: Int, target: Int, promotionPiece: Int): Move

Creates a Move object from the specified origin and target squares (using Int as the squares types) and the promotion piece.

Return

the corresponding Move for origin and target squares

Since

1.0.0-beta.1

Author

lunalobos

Parameters

origin

the origin square as an Int

target

the target square as an Int

promotionPiece

the promotion piece as an Int

Throws

for invalid moves


fun moveOf(origin: Square, target: Square): Move

Creates a Move object from the origin square and target square Square enum constants.

Return

the corresponding Move for origina and target squares.

Since

1.0.0-beta.1

Author

lunalobos

Parameters

origin

the origin Square

target

the target Square


fun moveOf(origin: Square, target: Square, promotionPiece: Piece): Move

Creates a Move object from the origin square, target square, and the promotion piece, using Square and Piece enum constants.

Return

the corresponding Move for origin and target squares and promotion piece

Author

lunalobos

Since

1.0.0-beta.1

Parameters

origin

the origin Square

target

the target Square

promotionPiece

the promotion Piece

Throws

for invalid moves


fun moveOf(move: String): Move

Creates a Move object from its UCI notation string (e.g., "e7e8q").

Return

the corresponding Move for the move string

Since

1.0.0-beta.1

Author

lunalobos

Parameters

move

the move string in UCI notation

Throws

for invalidad move strings