San Utils
object SanUtils
Utility object for converting between SAN (Standard Algebraic Notation) and Move objects. Provides methods to parse SAN strings into moves and to generate SAN strings from moves.
Overview
Parsing: Converts SAN strings into Move objects.
Rendering: Converts Move objects into SAN strings.
Utility: Provides helper methods for SAN-related operations.
Parsing Methods
sanToMove: Parses a SAN string into a Move object.
Rendering Methods
moveToSan: Converts a Move object into its SAN string representation.
Utility Methods
pieceTypeFromSanChar: Maps SAN characters to PieceType.
pieceToChar: Maps PieceType to SAN characters.
Example Usage
val move = SanUtils.sanToMove("e4", board, gameState)
val san = SanUtils.moveToSan(move, board, gameState)Content copied to clipboard