@echecs/fen - v4.0.0
    Preparing search index...

    Interface PositionData

    Plain-data representation of a chess position. All fields are optional — omitted fields use defaults (standard starting position values).

    interface PositionData {
        board?: ReadonlyMap<
            | "a1"
            | "a2"
            | "a3"
            | "a4"
            | "a5"
            | "a6"
            | "a7"
            | "a8"
            | "b1"
            | "b2"
            | "b3"
            | "b4"
            | "b5"
            | "b6"
            | "b7"
            | "b8"
            | "c1"
            | "c2"
            | "c3"
            | "c4"
            | "c5"
            | "c6"
            | "c7"
            | "c8"
            | "d1"
            | "d2"
            | "d3"
            | "d4"
            | "d5"
            | "d6"
            | "d7"
            | "d8"
            | "e1"
            | "e2"
            | "e3"
            | "e4"
            | "e5"
            | "e6"
            | "e7"
            | "e8"
            | "f1"
            | "f2"
            | "f3"
            | "f4"
            | "f5"
            | "f6"
            | "f7"
            | "f8"
            | "g1"
            | "g2"
            | "g3"
            | "g4"
            | "g5"
            | "g6"
            | "g7"
            | "g8"
            | "h1"
            | "h2"
            | "h3"
            | "h4"
            | "h5"
            | "h6"
            | "h7"
            | "h8",
            Piece,
        >;
        castlingRights?: CastlingRights;
        enPassantSquare?: | "a3"
        | "a6"
        | "b3"
        | "b6"
        | "c3"
        | "c6"
        | "d3"
        | "d6"
        | "e3"
        | "e6"
        | "f3"
        | "f6"
        | "g3"
        | "g6"
        | "h3"
        | "h6";
        fullmoveNumber?: number;
        halfmoveClock?: number;
        turn?: Color;
    }
    Index

    Properties

    board?: ReadonlyMap<
        | "a1"
        | "a2"
        | "a3"
        | "a4"
        | "a5"
        | "a6"
        | "a7"
        | "a8"
        | "b1"
        | "b2"
        | "b3"
        | "b4"
        | "b5"
        | "b6"
        | "b7"
        | "b8"
        | "c1"
        | "c2"
        | "c3"
        | "c4"
        | "c5"
        | "c6"
        | "c7"
        | "c8"
        | "d1"
        | "d2"
        | "d3"
        | "d4"
        | "d5"
        | "d6"
        | "d7"
        | "d8"
        | "e1"
        | "e2"
        | "e3"
        | "e4"
        | "e5"
        | "e6"
        | "e7"
        | "e8"
        | "f1"
        | "f2"
        | "f3"
        | "f4"
        | "f5"
        | "f6"
        | "f7"
        | "f8"
        | "g1"
        | "g2"
        | "g3"
        | "g4"
        | "g5"
        | "g6"
        | "g7"
        | "g8"
        | "h1"
        | "h2"
        | "h3"
        | "h4"
        | "h5"
        | "h6"
        | "h7"
        | "h8",
        Piece,
    >

    Piece placement as a map from square to piece. Defaults to an empty board.

    castlingRights?: CastlingRights

    Castling availability. Defaults to all four castling moves available.

    enPassantSquare?:
        | "a3"
        | "a6"
        | "b3"
        | "b6"
        | "c3"
        | "c6"
        | "d3"
        | "d6"
        | "e3"
        | "e6"
        | "f3"
        | "f6"
        | "g3"
        | "g6"
        | "h3"
        | "h6"

    En passant target square, if any.

    fullmoveNumber?: number

    Game turn counter — starts at 1 and increments after each black move. After 1. e4 e5 2. Nf3 the fullmove number is 2. Defaults to 1.

    halfmoveClock?: number

    Number of half-moves since the last pawn advance or capture. Resets to 0 on every pawn move or capture. When it reaches 100 (50 full moves per side) either player may claim a draw. Defaults to 0.

    turn?: Color

    Side to move. Defaults to 'white'.