FenSerialization

public class FenSerialization

FEN positions serialization and deserialization.

  • FenSerialization object with default settings.

    Declaration

    Swift

    public static let `default`: FenSerialization
  • Deserialize position from given FEN string.

    Declaration

    Swift

    public func deserialize(fen: String) -> Position

    Parameters

    fen

    String containing FEN position.

    Return Value

    Position object initialized from given FEN string.

  • Serialize position to FEN string.

    Declaration

    Swift

    public func serialize(position: Position) -> String

    Parameters

    position

    Position object that sould be serialized.

    Return Value

    FEN string describing given position.