AbstractAbstractaddAbstractclearErase all the moves in the current Variation: after that, Variation.first returns undefined.
If the current Variation is already empty (i.e. if Variation.first returns undefined already),
nothing happens.
AbstractclearRemove all the NAGs from the current node or variation.
AbstractclearRemove all the key-value tag pairs from the the current node or variation.
AbstractNode.tags for more details on tags.
AbstractcommentGet the text comment (if any) associated to the current node or variation.
Set the text comment associated to the current node or variation.
If undefined, the existing value (if any) is erased.
OptionalisLongComment: booleanfalse by default.
AbstractfilterRemove from the the current node or variation the NAGs
for which the given filter evaluates to false (and keep those for which it evaluates to true).
AbstractfilterRemove from the the current node or variation the key-value tag pairs for which the given filter evaluates to false
(and keep those for which it evaluates to true).
AbstractNode.tags for more details on tags.
AbstractfinalFEN representation of the chess position at the end of the variation.
The fifty-move clock and full-move number are set according to the underlying game in the string returned by this method.
AbstractfinalChess position at the end of the variation.
AbstractfirstAbstractfollowingIdentifier of the Node that arise after playing distance moves starting from the current Node or Variation.
REMARK: the ID returned by this method may not correspond to an existing Node if the underlying variation is not long enough. Still, in that case, the returned ID is always properly formed, and could correspond to a valid node later if the variation is extended.
If distance is 0, this method returns the same result as AbstractNode.id.
Must be a positive integer.
AbstracthasCheck whether the current node or variation has the given NAG or not.
AbstractidAbstractinitialFEN representation of the chess position at the beginning of the variation.
The fifty-move clock and full-move number are set according to the underlying game in the string returned by this method.
AbstractinitialNumber of half-moves since the last pawn move or capture at the beginning of the variation (see Node.fiftyMoveClock).
AbstractinitialFull-move number at the beginning of the variation (see Node.fullMoveNumber).
AbstractinitialChess position at the beginning of the variation.
AbstractisWhether the text comment associated to the current node or variation is long or short.
false if no comment is defined.
AbstractisWhether the current variation is considered as a "long" variation, i.e. a variation that should be displayed in an isolated block.
AbstractnagsAbstractnodesReturn the nodes corresponding to the moves of the current variation.
AbstractparentReturn the Node to which the current variation is attached.
undefined if the current variation is the main one (see Game.mainVariation).
AbstractplayCreate a new node representing the given move, and append it to the current node or variation.
If there are some pre-existing subsequent nodes, they are all erased.
SAN representation of the move, or '--' for a null-move.
The newly created Node.
exception.InvalidNotation if the move notation cannot be parsed, or if the parsed move would correspond to an illegal move.
AbstractplyNumber of half-moves in the current variation.
AbstractremoveAbstracttagGet the value associated to the given tag key on the current node or variation.
AbstractNode.tags for more details on tags.
Set the value associated to the given tag key on the current node or variation.
If undefined, the existing value (if any) is erased.
AbstractNode.tags for more details on tags.
AbstracttagsReturn the keys of the tags associated to the current node or variation.
The tag mechanism is a key-value associative container allowing to store some arbitrary data
on each node or variation. In PGN, the tags are represented as [%tagKey tagValue] strings
appended to text comments.
The tag keys must be non-empty, and can contain only alphanumeric or underscore characters.
array sorted in increasing order.
Represent one variation in the tree structure formed by a chess game, meaning a starting chess position and a list of moves played consecutively from this position.