Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PgnViewerJS should accept Long Algebraic Notation in various forms #28

Closed
mliebelt opened this issue Sep 18, 2016 · 1 comment
Closed
Assignees

Comments

@mliebelt
Copy link
Owner

Currently the reader does not understand the Long Algebraic Notation, so code like

pgnReader({pgn: '4... Nf6xc4', fen: 'r1bqkb1r/pppp1ppp/2n2n2/4p3/2B1P3/5N2/PPPP1PPP/RNBQ1RK1 b kq - 5 4'});

results in the following error

SyntaxError: Expected " ", "!!", "!", "!?", "#", "$", "(", "*", "+", "0-1", "0:1", "1-0", "1/2-1/2", "1:0", "=", "?!", "?", "??", "D", "{", "∞", end of input, or integer but "x" found.

The reason for that is that only disambiguation (column XOR row) is allowed, but not both like in Nf6xc4.

See the documentation to move() in chess.js with the sloppy flag what should be possible out of the box.

@mliebelt mliebelt self-assigned this Sep 18, 2016
mliebelt added a commit that referenced this issue Nov 2, 2016
@mliebelt
Copy link
Owner Author

mliebelt commented Nov 2, 2016

Works for some long notations, close the issue for that. Not all possible formats are supported.

@mliebelt mliebelt closed this as completed Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant