https://github.com/shaack/cm-chess
It's like chess.js, but in ES6 and can handle variations
https://github.com/shaack/cm-chess
chess chessmail es6 javascript released
Last synced: about 1 year ago
JSON representation
It's like chess.js, but in ES6 and can handle variations
- Host: GitHub
- URL: https://github.com/shaack/cm-chess
- Owner: shaack
- License: mit
- Created: 2020-06-08T16:52:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-07T15:08:40.000Z (about 2 years ago)
- Last Synced: 2024-11-14T23:02:51.163Z (over 1 year ago)
- Topics: chess, chessmail, es6, javascript, released
- Language: JavaScript
- Homepage:
- Size: 122 KB
- Stars: 28
- Watchers: 2
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cm-chess
It is like [chess.js](https://github.com/jhlywa/chess.js) (and is based on an older version of chess.js),
but can handle history variations (tree-structured move history),
PGN header values, Nags and Comments.
## Install
`npm install cm-chess`
## Features
- It has a similar API to chess.js
- It can handle history variations
- It can add Nags, Comments and Annotations
- It is a core compoent of my online chess server [chessmail.de](https://www.chessmail.de) (it works)
## API
For documentation, see the jsdoc annotations in [Chess.js](https://github.com/shaack/cm-chess/blob/master/src/Chess.js).
cm-chess uses [cm-pgn](https://github.com/shaack/cm-pgn) for the
header and history, therefore you have also the full API of **cm-pgn**.
If I have some time, I will write a better documentation here in this README. :)
## Examples
See the unit tests for usage examples
https://github.com/shaack/cm-chess/blob/master/test/TestChess.js
And also the unit tests of cm-pgn
https://github.com/shaack/cm-pgn/tree/master/test
## Test
[Run the unit tests](https://shaack.com/projekte/cm-chess/test/)