Skip to content

Releases: jhlywa/chess.js

v0.12.1

05 Feb 15:38
Compare
Choose a tag to compare

Bug Fixes

  • [PGN] Fix duplication of last move when loading PGN containing trailing comments without a game termination marker (@jhlywa - 321a25e)
  • [PGN] Fix PGN export that included unnecessary move disambiguators (@SyntaxBlitz - 1814427)

0.12.0

29 May 01:32
Compare
Choose a tag to compare

Enhancements

  • [SAN] Improve performance of SAN move parser by inferring the piece the user is moving (in both .move() and .load_pgn()) and restricting move generation to those piece types. This change resulted in a 50% performance improvement as measured through the unit tests. (@ejezisek - #275)

0.11.0

22 Feb 22:34
Compare
Choose a tag to compare

Enhancements

  • [PGN] Add support for PGN comments (new API: .set_comment(comment), .get_comment(), .get_comments(), .delete_comment(), .delete_comments()) (@jtwires - #235)

Bug Fixes

  • [PGN] Parse PGN headers with whitespace before closing brackets (@erral - #191)

0.10.3

22 Feb 17:45
Compare
Choose a tag to compare

Enhancements

  • Added .board() function to return a 2D representation of the board (@jhlywa - f2a9baa)
  • Revamped documentation for .load_pgn() function (@svangordon - #149)
  • The minified version of the source code has been removed from version control.

Bug Fixes

  • [PGN] Fix bug where PGN parser fail to load PGN with a comment before the first move (@svangordon - #150)
  • [PGN] Fix bug where PGN data containing SetUp and FEN tags causes header information to be lost (@siansell - #154)

0.10.2

10 Jun 04:44
Compare
Choose a tag to compare

Enhancements

  • [Parser] The sloppy parser now supports many variations of Long Algebraic Notation, such as: e2e4, e2-e4, Pe2e4, Pe2-e4, Qf3xf7+, e7xf8Q+ (capture and promotion), and e1-g1 (king-side castling). This parser will also catch and parse many non-standard methods of move disambiguation.

0.10.1

10 Jun 04:41
Compare
Choose a tag to compare

Enhancements

  • [Parser] The code paths for load_pgn() and move() have been merged. Any future changes to the move parser will be available in both funtions.

Bug Fixes

  • [Parser] Fix bug where sloppy parser could not parse correctly disambiguated moves.

0.10.0

08 Jun 02:42
Compare
Choose a tag to compare

Enhancements

  • [Parser] Add optional sloppy argument to .move and .load_pgn. This change relaxes the SAN move parser to allow for overly
    disambiguated moves arising during absolute pins. Over disambiguation violates the SAN spec, but many programs (including Chessbase and Fritz) seem to ignore this rule.

0.9.4

25 Mar 01:39
Compare
Choose a tag to compare

Bug Fixes

  • [PGN] load_pgn() now correctly parses black to move indicators after comments or RAV's (1. d4 d5 2. Bf4 Nf6 3. e3 g6 4. Nf3 (4. Nc3 Bg7 5. Nf3 O-O 6. Be2 c5) **4...** Bg7 5. h3 { 5. Be2 O-O 6. O-O c5 7. c3 Nc6 } **5...** O-O).
  • [PGN] load_pgn() now ignores numeric annotation glyphs (25. Rb3 $1 h4)
  • [PGN] if available, pgn() now uses the move number specified in the PGN SetUp header
  • [FEN] validate_fen() now ensures the en-passant square is valid with respect to the side to move

0.9.3

02 Dec 03:00
Compare
Choose a tag to compare

Enhancements

  • Modify package.json for inclusion with cdnjs

0.9.2

29 Nov 20:35
Compare
Choose a tag to compare

Bug fixes

  • load_pgn() now ignores (and correctly parses) Recursive Annotation Variation (RAV) found with a PGN move list
  • Fixes handling of multi-char move evaluation symbols (e.g. 1. a4?!)

Documentation

  • Document calling .header() without arguments to retrieve PGN header information