@echecs/position
    Preparing search index...

    Interface DeriveOptions

    Options accepted by Position.derive. Extends PositionData (minus board) with a changes field for applying piece changes.

    interface DeriveOptions {
        castlingRights?: CastlingRights;
        changes?: [Square, Piece | undefined][];
        enPassantSquare?: EnPassantSquare;
        fullmoveNumber?: number;
        halfmoveClock?: number;
        turn?: Color;
    }

    Hierarchy

    Index

    Properties

    castlingRights?: CastlingRights

    Castling availability. Defaults to all four castling moves available.

    changes?: [Square, Piece | undefined][]

    Piece changes as [square, piece] tuples. Set piece to undefined to clear a square. Only changed squares need to be listed.

    enPassantSquare?: EnPassantSquare

    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'.