AbstractNode.followingId() to compute the ID of any node following a given node or variation.Node.notation() for efficiency.Position.ascii(): flip / coordinates / prefix (based on #49).Game.findById() for ID aliases.Game.findById() work with ID aliases (e.g. 'end' to indicate the last node in the main variation).Node.fiftyMoveClock() to retrieve the number of half-moves since the last pawn move or capture.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 methods Game.initialFEN()
and Game.finalFEN() to retrieve the FEN representations of the initial and final position of a game.AbstractNode.clearNags() and AbstractNode.filterNags(..) to remove all the NAGs from a node or variation, or to keep only a subset of them.AbstractNode.clearTags() and AbstractNode.filterTags(..) to achieve similar operations on the key-value tag pairs of a node or variation.pgnWrite(..).for...of syntax to iterate over all the games of a Database with method Database.games()
(see #36).isColor(..), isSquare(..), isColoredPiece(..), etc...SquareCouple to represent an ordered pair of squares, or a displacement on a chessboard.Game.finalPosition() and Variation.finalPosition() to retrieve the position at the end of a game or sub-variation.Node.removePrecedingMoves() to erase the beginning of a game up to a given move.Game.fullRound() to get a human-readable string representation of the round, sub-round and sub-sub-round all together.Game.initialFullMoveNumber() and Game.clearHeaders().Game.pojo() and Game.fromPOJO() to convert back and forth between a Game instance
and its corresponding POJO representation,
hence allowing JSON serialization/de-serialization of a Game instance, deep cloning, etc...Game.round(): look at the migration guide
for more details.Position.isDead() to detect positions in which the remaining material is not sufficient for any player to checkmate its opponent
(aka. dead positions).ECO (opening code in the Encyclopaedia of Chess Openings classification).Opening, Variation, and SubVariation (description of the opening).Termination (description of the reason for the conclusion of the game).PlyCount tags (number of half-moves of the game) in the PGN generated by pgnWrite(..).Position.isEqual(..) do work as expected even in case of move order transposition
(see discussion in #27).Game.date() and Game.playerElo():
look at the migration guide for more details.Node.isVariation() and Variation.isVariation() to discriminate between Node and Variation instances.RR and N in pgnRead(..).pgnRead(..) when invoked with no game index: now, the function is guaranteed to not throw InvalidPGN
(thus it always returns a Database object).pgnWrite(..).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.Position.play(..) (see #27).Game.nodes(..) to retrieve all the moves of a game (optionally with those coming from the sub-variations).Position.isEqual(..) to check whether two instances of Position are identical or not.Node.previous(), Node.parentVariation() and Variation.parentNode().nagSymbol(..) to retrieve the human-readable symbols associated to each
NAG.Node.id(), Variation.id() and Game.findById(..).Database#game(..) with invalid indexes (see #24).Database (thus allowing for ... instanceof Database).Game and related objects: Node.promoteVariation(),
Node.removeVariation(), Node.removeFollowingMoves()... (see #22).Game.dateAsString().pgnWrite().Game.ascii().Position.isMoveLegal(): from now one,
castling moves will be recognized as legal if and only if argument to corresponds to the origin square
of the castling rook. As a consequence, no confusion is possible anymore between castling and regular king moves,
and status castle960 do not exist anymore among the objects that can be returned by Position.isMoveLegal().
This change affects only Chess960; regular chess and other variants are not impacted.Position.kingSquare() in non-standard variants, especially variants
in which king has no "royal power".util.'variant:FEN' is Position constructor and FEN getter.oppositeColor().Variations.nodes() (see #9).
WARNING! This impacts the lifecycle of the Node objects returned by Node.next() and Node.play(..):
now, these functions always return a new instance of Node, instead of reusing the current one.