INNER CODE UNIT · TypeScript
matchingMove
josefjadrny/js-chess-engine · src/index.ts:161
const matchingMove = legalMoves.find(m => m.from === fromIndex && m.to === toIndex);
if (matchingMove) {
applyMoveComplete(tempBoard, matchingMove);
const config = boardToConfig(tempBoard);
result.push({ ...config, move });
}
}
return result;
}
/**
* Export current board state as JSON configuration
*
* @returns Board configuration object
*/
exportJson(): BoardConfig {