mwg API
    Preparing search index...

    Function loadTablebaseEnding

    • Loads a checked-in ending file into probeable arrays: validates the id against its extras, the position count against the piece count, and both payloads against the count, so a truncated artifact fails here with its ending named.

      Parameters

      Returns LoadedEnding

      import { loadTablebaseEnding } from '@datamoc/mwg/board';

      const ending = loadTablebaseEnding({ version: 1, id: 'KBK', white: ['bishop'], positions: 2, wdl: 'AgEC', dtm: 'AAQAAQ' });
      console.log(ending.id); // 'KBK'