Move

class Move

Represents a single player's move on the board. It does not store information about the origin position, as its primary purpose is move representation. Its string representation is the full algebraic notation of the move as used in the UCI protocol (e.g., "e2e4", "a7a8q"). It is immutable.

This class leverages bitwise operations for efficient storage and manipulation.

This is a facade created to enable exporting the code to JS, though it can also be used directly within the JS modules of any KMP project.

Properties

Link copied to clipboard
val backedMove: Move
Link copied to clipboard
val origin: Int

The zero-based index (0-63) of the move's origin square.

Link copied to clipboard

The ordinal value of the promotion piece, or -1 if no promotion occurs.

Link copied to clipboard
val target: Int

The zero-based index (0-63) of the move's target square.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String