chess-moves
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

chess-moves · GitHub Workflow Status (branch) npm

Simple library for making moves using chess.js with the intention of using the state for showing Chessground board.

Why?

When getting started trying to make my own chess applications, writing the turn logic was always a bit difficult to get started. This library is intended to make writing turn logic and making moves easier by providing a smaller interface to work with. In addition to that it is also geared towards using Chessground as the graphical representation. These functions return small games states that should make rendering your board easier to manage.

Installation

Run the following command to install the most recent version of chess.js from NPM:

npm install chess-moves

Example Code

import { createChessGame } from 'chess-moves';

const chessGame = createChessGame();

// AI Plays white
let delta = chessGame.playAiMove();

// User Plays Black
delta = chessGame.playUserMove({ from: 'e7', to: 'e5' });

Readme

Keywords

Package Sidebar

Install

npm i chess-moves

Weekly Downloads

10

Version

1.3.1

License

GPL-3.0-or-later

Unpacked Size

482 kB

Total Files

12

Last publish

Collaborators

  • jteagueii