chess-core
A fast, type-safe chess library with immutable state and bitboard representation.
Quick start
Section titled “Quick start”npm install @pech/chess-core# orbun add @pech/chess-coreimport { fromFen, fromSan, makeMove, toSan, isCheckmate, STARTING_FEN } from '@pech/chess-core';
const pos = fromFen(STARTING_FEN);const move = fromSan(pos, 'e4');const newPos = makeMove(pos, move);
console.log(toSan(pos, move)); // "e4"console.log(isCheckmate(newPos)); // false