UNPKG

kokopu

Version:

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

35 lines (34 loc) 1.13 kB
Event = {Game with removed variation.} [start] -+<LONG [1w] (1w) e4 (#hm=0) [1b] (1b) e5 (#hm=0) | [1b-v0-start] +---+ [1b-v0-1b] | (1b) c5 (#hm=0) | [1b-v1-start] +---+ [1b-v1-1b] | (1b) c6 (#hm=0) | [1b-v2-start] +---+ [1b-v2-1b] | (1b) e6 (#hm=0) | [2w] (2w) Nf3 (#hm=1) +---+---+---+---+---+---+---+---+ | r | n | b | q | k | b | n | r | +---+---+---+---+---+---+---+---+ | p | p | p | p | | p | p | p | +---+---+---+---+---+---+---+---+ | | | | | | | | | +---+---+---+---+---+---+---+---+ | | | | | p | | | | +---+---+---+---+---+---+---+---+ | | | | | P | | | | +---+---+---+---+---+---+---+---+ | | | | | | N | | | +---+---+---+---+---+---+---+---+ | P | P | P | P | | P | P | P | +---+---+---+---+---+---+---+---+ | R | N | B | Q | K | B | | R | +---+---+---+---+---+---+---+---+ b KQkq - {Line}{3 plies}