UNPKG

kokopu

Version:

A JavaScript/TypeScript library implementing the chess game rules and providing tools to read/write the standard chess file formats.

38 lines (37 loc) 1.48 kB
Event = {Game with long & short comments and variations 1.} [start] -+<LONG {I'm the main variation header (long) comment.}<LONG [1w] (1w) e4 (#hm=0) {I'm a long comment.}<LONG [1b] (1b) e5 (#hm=0) | [1b-v0-start] +---+<LONG [1b-v0-1b] | (1b) c5 (#hm=0) [1b-v0-2w] | (2w) Nf3 (#hm=1) | [2w] (2w) Nf3 (#hm=1) [2b] (2b) Nc6 (#hm=2) [3w] (3w) Bc4 (#hm=3) | [3w-v0-start] +---+<LONG {I'm a long comment too.}<LONG [3w-v0-3w] | (3w) Bb5 (#hm=3) [3w-v0-3b] | (3b) a6 (#hm=0) {I'm a short comment.} | [3b] (3b) Bc5 (#hm=4) {I'm a long comment at the end of the game.}<LONG +---+---+---+---+---+---+---+---+ | r | | b | q | k | | n | r | +---+---+---+---+---+---+---+---+ | p | p | p | p | | p | p | p | +---+---+---+---+---+---+---+---+ | | | n | | | | | | +---+---+---+---+---+---+---+---+ | | | b | | p | | | | +---+---+---+---+---+---+---+---+ | | | B | | P | | | | +---+---+---+---+---+---+---+---+ | | | | | | N | | | +---+---+---+---+---+---+---+---+ | P | P | P | P | | P | P | P | +---+---+---+---+---+---+---+---+ | R | N | B | Q | K | | | R | +---+---+---+---+---+---+---+---+ w KQkq - {Line}{6 plies}