UNPKG

kokopu

Version:

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

36 lines (35 loc) 1.31 kB
Event = {Game with annotations 2} [start] -+<LONG $10 [1w] (1w) e4 (#hm=0) $5 $13 [1b] (1b) e5 (#hm=0) [2w] (2w) Nf3 (#hm=1) [cal = {Rf3e5}] [2b] (2b) Nc6 (#hm=2) [3w] (3w) Bc4 (#hm=3) [3b] (3b) Bc5 (#hm=4) [4w] (4w) c3 (#hm=0) [4b] (4b) Nf6 (#hm=1) [5w] (5w) d4 (#hm=0) [cal = {Rd4c5,Rd4e5}] [5b] (5b) exd4 (#hm=0) [6w] (6w) cxd4 (#hm=0) [6b] (6b) Bb4+ (#hm=1) [7w] (7w) Nc3 (#hm=2) [7b] (7b) O-O (#hm=3) [TheFirstTag = {abc}] +---+---+---+---+---+---+---+---+ | r | | b | q | | r | k | | +---+---+---+---+---+---+---+---+ | p | p | p | p | | p | p | p | +---+---+---+---+---+---+---+---+ | | | n | | | n | | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | b | B | P | P | | | | +---+---+---+---+---+---+---+---+ | | | N | | | N | | | +---+---+---+---+---+---+---+---+ | P | P | | | | P | P | P | +---+---+---+---+---+---+---+---+ | R | | B | Q | K | | | R | +---+---+---+---+---+---+---+---+ w KQ - {Line}{14 plies}