- Fix broken links in documentation.
- Upgrade and rework documentation generator (TypeDoc).
- Make PGN parsing tolerant to missing end-of-game token at the very end of the PGN string (see #46).
- Add support for NAGs $20 and $21.
- Minor fixes.
- Fix inconsistent object returned by
Game.findById()
for ID aliases.
- Make
Game.findById()
work with ID aliases (e.g.'end'
to indicate the last node in the main variation).
- Compile TypeScript to ES2020 (except for standalone lib).
- Minor fixes in code and dependencies.
- Add method
Node.fiftyMoveClock()
to retrieve the number of half-moves since the last pawn move or capture. - Add method
Node.fen()
to retrieve the FEN representation of the position on a game node, with the FEN counters (fifty-move clock and full-move number) set according to the move history of the game (see #43). Add similarly methodsGame.initialFEN()
andGame.finalFEN()
to retrieve the FEN representations of the initial and final position of a game.
- Add methods
AbstractNode.clearNags()
andAbstractNode.filterNags(..)
to remove all the NAGs from a node or variation, or to keep only a subset of them. - Add methods
AbstractNode.clearTags()
andAbstractNode.filterTags(..)
to achieve similar operations on the key-value tag pairs of a node or variation.
- Fix tag formatting in comments written by
pgnWrite(..)
.
- Fix parsing of multi-part text comments (see #40).
- Add support for NAG $44.
- Add support for NAG $9 (see #38).
- Add support for the
for...of
syntax to iterate over all the games of aDatabase
with methodDatabase.games()
(see #36).
- Introduce predicates
isColor(..)
,isSquare(..)
,isColoredPiece(..)
, etc... - Introduce type
SquareCouple
to represent an ordered pair of squares, or a displacement on a chessboard.
- Continuous integration with GitHub Actions instead of Travis-CI.
- Introduce
Game.finalPosition()
andVariation.finalPosition()
to retrieve the position at the end of a game or sub-variation.
- Introduce
Node.removePrecedingMoves()
to erase the beginning of a game up to a given move.
- Introduce
Game.fullRound()
to get a human-readable string representation of the round, sub-round and sub-sub-round all together.
- Introduce
Game.initialFullMoveNumber()
andGame.clearHeaders()
. - Introduce
Game.pojo()
andGame.fromPOJO()
to convert back and forth between aGame
instance and its corresponding POJO representation, hence allowing JSON serialization/de-serialization of aGame
instance, deep cloning, etc... - Breaking changes affecting
Game.round()
: look at the migration guide for more details.
- Introduce
Position.isDead()
to detect positions in which the remaining material is not sufficient for any player to checkmate its opponent (aka. dead positions).
- Add support for PGN tag
ECO
(opening code in the Encyclopaedia of Chess Openings classification). - Add support for PGN tags
Opening
,Variation
, andSubVariation
(description of the opening). - Add support for PGN tag
Termination
(description of the reason for the conclusion of the game). - Add an option to write the
PlyCount
tags (number of half-moves of the game) in the PGN generated bypgnWrite(..)
.
- Introduce effective castling (see #32) and effective en-passant
(see #31), in order to make parsing of FEN strings with unreliable castling and/or
en-passant flags easier, and to ensure that
Position.isEqual(..)
do work as expected even in case of move order transposition (see discussion in #27).
- Migration to TypeScript.
- Breaking changes affecting ES6 default imports, and methods
Game.date()
andGame.playerElo()
: look at the migration guide for more details.
- Fix PGN parsing issues regarding move number 0 and degenerated backslash followed by a linebreak (see #30).
- Fix castling move validation at Chess960 (see #29).
- Introduce
Node.isVariation()
andVariation.isVariation()
to discriminate betweenNode
andVariation
instances. - Add support for NAGs
RR
andN
inpgnRead(..)
. - Fix behavior of
pgnRead(..)
when invoked with no game index: now, the function is guaranteed to not throwInvalidPGN
(thus it always returns aDatabase
object). - Improve formatting of the PGN generated by
pgnWrite(..)
. - Change the heuristic used by
pgnRead(..)
to decide whether a variation comment is a long or a short comment: from now on, a variation comment is considered as "long" if and only if it is followed by a blank line in the PGN (instead of preceded, as it used to be). No change regarding how node comments are processed.
- Fix update procedure for en-passant flag in
Position.play(..)
(see #27).
- Add support for NAGs $141, $143 and RR.
- Remove dependency with security issue.
- Introduce
Game.nodes(..)
to retrieve all the moves of a game (optionally with those coming from the sub-variations). - Introduce
Position.isEqual(..)
to check whether two instances ofPosition
are identical or not.
- Add methods to move backward in the move tree:
Node.previous()
,Node.parentVariation()
andVariation.parentNode()
. - Introduce
nagSymbol(..)
to retrieve the human-readable symbols associated to each NAG.
- Introduce
Node.id()
,Variation.id()
andGame.findById(..)
.
- Fix behavior of
Database#game(..)
with invalid indexes (see #24).
- Expose
Database
(thus allowing for... instanceof Database
).
- Enrich variation-management methods on
Game
and related objects:Node.promoteVariation()
,Node.removeVariation()
,Node.removeFollowingMoves()
... (see #22).
- Minor fixes in doc and dependencies.
- Add support for Horde chess.
- Introduce
Game.dateAsString()
.
- Introduce
pgnWrite()
. - Introduce
Game.ascii()
. - Change the way castling moves are handled at Chess960 in
Position.isMoveLegal()
: from now one, castling moves will be recognized as legal if and only if argumentto
corresponds to the origin square of the castling rook. As a consequence, no confusion is possible anymore between castling and regular king moves, and statuscastle960
do not exist anymore among the objects that can be returned byPosition.isMoveLegal()
. This change affects only Chess960; regular chess and other variants are not impacted.
- Support castling moves encoded with zeros (see #6).
- Minor fixes in doc and packaged files.
- Add support for Antichess.
- Clarify the expected behavior of
Position.kingSquare()
in non-standard variants, especially variants in which king has no "royal power".
- Avoid dependency on built-in module
util
.
- Add tutorial "Set-up a game from scratch".
- Minor changes in exception messages.
- Support syntax
'variant:FEN'
isPosition
constructor and FEN getter. - Add code coverage.
- Rework deployment flow.
- Introduce
oppositeColor()
.
- Minor fixes in doc and packaging scripts.
- Add UCI move parsing and generation.
- Fix minor PGN parsing issues.
- Report line index in PGN parsing exceptions.
- Improve parsing resiliency to PGN syntactic errors.
- Add figurine notation.
- More lenient chess960 variant header parsing.
- Add variants "No king" and "White/Black king only" (see #12).
- Add some tutorials (see #10).
- Improve PGN parsing robustness to linebreak issues (see #11).
- Introduce
Variations.nodes()
(see #9). WARNING! This impacts the lifecycle of theNode
objects returned byNode.next()
andNode.play(..)
: now, these functions always return a new instance ofNode
, instead of reusing the current one.
- Add some missing documentation (see #10).
- Fix PGN parsing in presence of byte order mark (see #7).
- Fix parsing of comment tags spanning on more than one line (see #8).
- Fix disambiguation issue (see #5).
- Fix parsing of lichess syntax for %csl/�l (see #4).
- Fix parsing for games having a variant tag set to "Standard" (see #3).
- Fix invalid move notation issue (see #2).
- Optimization: reduce the memory footprint of object Game.
- PGN parsing is now robust to ill-formed header tags.
- Replace JSHint with ESLint.
- Add support for Chess960 (aka. Fischer Random Chess).
- Fix invalid move notation issue (see #1).
- Fix URL issue.
- Provide a browser-ready package.
- Add and publish documentation.
- Improve testing pipeline.
- Integration with Travis-CI.
- Build both minified and non-minified files.
- Fix various move descriptor issues.
- Add changelog file.
- Fix meta-data.
- First public version.