kokopu
Version:
A JavaScript/TypeScript library implementing the chess game rules and providing tools to read/write the standard chess file formats.
49 lines (48 loc) • 1.88 kB
Plain Text
Event = {Game with long & short comments and variations 2.}
[start] -+<LONG {I'm the main variation header (short) comment.}
[1w] (1w) e4 (#hm=0) {I'm a long comment with sub-variation siblings.}<LONG
|
[1w-v0-start] +---+
[1w-v0-1w] | (1w) d4 (#hm=0)
[1w-v0-1b] | (1b) d5 (#hm=0)
|
[1b] (1b) e5 (#hm=0)
[2w] (2w) Nf3 (#hm=1)
|
[2w-v0-start] +---+<LONG
[2w-v0-2w] | (2w) Nc3 (#hm=1) {I'm a long comment at the end of a variation.}<LONG
|
[2b] (2b) Nc6 (#hm=2)
[3w] (3w) Bc4 (#hm=3)
|
[3w-v0-start] +---+<LONG
[3w-v0-3w] | (3w) Bb5 (#hm=3)
[3w-v0-3b] | (3b) a6 (#hm=0)
|
[3w-v1-start] +---+
[3w-v1-3w] | (3w) d4 (#hm=0)
|
[3b] (3b) Bc5 (#hm=4)
|
[3b-v0-start] +---+<LONG {I'm a long comment at the beginning of a variation.}<LONG
[3b-v0-3b] | (3b) d6 (#hm=0)
|
+---+---+---+---+---+---+---+---+
| 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}