Checkers @ymir-js/checkers
Turkish and International, against the computer.
Checkers, chess, Go and match-3 with their full rules, on a small Board and
Item core you can build your own games on. No framework, no dependencies.
npm install @ymir-js/core
The board for your own games. Add a ready-made game with
its own package: @ymir-js/chess, @ymir-js/checkers,
@ymir-js/go or @ymir-js/match3.
Every one runs on the same Board and Item. Play them, then read the source.
Turkish and International, against the computer.
Every rule, PGN and FEN, and a built-in engine.
9×9 to 19×19, ko and superko, scoring.
Swaps, cascades step by step, hints.
@ymir-js/core example apps that write their own rules on the core; read their source
Install only what you use. Every game package builds on @ymir-js/core; all of
them are at v0.14.0 and released together.
The board everything is built on: squares and items, movement patterns, directions, rays, reach and paths, snapshots.
npm install @ymir-js/core
Turkish and International checkers: full rules, capture chains, draws, undo and PDN notation.
npm install @ymir-js/checkers
Every rule, FEN / SAN / UCI / PGN, perft-verified move generation and a small engine.
npm install @ymir-js/chess
Captures, ko and superko, pass and resign, dead stones, area and territory scoring.
npm install @ymir-js/go
Swaps, matches, gravity, refills and cascades reported step by step.
npm install @ymir-js/match3
Plain classes: read the state, call a method, draw it however you like.
import { ChessGame } from '@ymir-js/chess';
import { GoGame } from '@ymir-js/go';
import { CheckersGame } from '@ymir-js/checkers';
const chess = new ChessGame();
chess.move('e4');
chess.getBestMove({ depth: 3 }); // { san: 'Nf6', ... }
const go = new GoGame({ size: 9 });
go.play('4|4');
go.getStatus(); // { state: 'playing' }
const checkers = CheckersGame.create('turkish');
checkers.getLegalMoves(); // [{ from, path, captured }, ...]
Plain-text files in the llms.txt format, rebuilt with this site. Give your coding agent the link and it has what it needs.
The short version: what the library is, the conventions to know before writing code, and where each API lives.
https://aykutkardas.github.io/ymir-js/llms.txt
Everything in one file: llms.txt, the whole README, and the public type declarations of every package.
https://aykutkardas.github.io/ymir-js/llms-full.txt
Paste it into your agent, then describe the game you want.
Use ymir-js for the board and the rules. Install only the packages needed:
@ymir-js/core for the board (and any custom game), plus @ymir-js/checkers,
@ymir-js/chess, @ymir-js/go or @ymir-js/match3 for those games.
Before writing code, read https://aykutkardas.github.io/ymir-js/llms.txt,
and https://aykutkardas.github.io/ymir-js/llms-full.txt for exact types.
Coordinates are "row|col" strings. Use the built-in game classes
(CheckersGame, ChessGame, GoGame, Match3Board) when they fit; for a new
game, build on Board and Item from the core, as the custom games do.
"row|col", from 0, row 0 at the top. Chess also takes "e4".play and move throw on an illegal move; ask getLegalMoves() first.getStatus() and save with toJSON() / fromJSON().@ymir-js/core for the board, plus one package per game: @ymir-js/checkers, chess, go, match3.Source of truth: the README, packages/ with tests next to the code, and examples/.