UNPKG

kokopu

Version:

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

28 lines (27 loc) 956 B
Event = {Game with undefined fields} [start] -+<LONG [1w] (1w) e4 (#hm=0) [1b] (1b) e5 (#hm=0) [2w] (2w) Nf3 (#hm=1) [2b] (2b) Nc6 (#hm=2) [3w] (3w) d4 (#hm=0) {I'm a comment...} [3b] (3b) exd4 (#hm=0) $1 $10 [csl = {Gd4}] +---+---+---+---+---+---+---+---+ | r | | b | q | k | b | n | r | +---+---+---+---+---+---+---+---+ | p | p | p | p | | p | p | p | +---+---+---+---+---+---+---+---+ | | | n | | | | | | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | | | p | P | | | | +---+---+---+---+---+---+---+---+ | | | | | | N | | | +---+---+---+---+---+---+---+---+ | P | P | P | | | P | P | P | +---+---+---+---+---+---+---+---+ | R | N | B | Q | K | B | | R | +---+---+---+---+---+---+---+---+ w KQkq - {Line}{6 plies}