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

Pgn Notation does not symbolize check (+) or mate(#) #26

Closed
rohandalvi opened this issue Sep 16, 2016 · 2 comments
Closed

Pgn Notation does not symbolize check (+) or mate(#) #26

rohandalvi opened this issue Sep 16, 2016 · 2 comments
Assignees
Labels

Comments

@rohandalvi
Copy link

  1. e4 e5 2. Nf3 c5 3. Bb5 Nc6 4. O-O Be7 5. c3 Nf6 6. Re1 O-O 7. d4 xd4 8. xd4 xd4 9. Bxc6 xc6 10. Nxd4 Bg4 11. f3 Bd7 12. Nc3 Qc7 13. Be3 Rd8 14. Qc2 Re8 15. Rd1 a5 16. a4 b6 17. b3 c5 18. Ne2 Bc6 19. Bf4 Qc8 20. Bg3 Nh5 21. Rxd8 Rxd8 22. Rd1 Nxg3 23. Rxd8 Qxd8 24. Nxg3 g5 25. Nf5 f6 26. Nxe7 Qxe7 27. Qd3 Qd7 28. Qxd7 Bxd7 29. Kf2 Kf7 30. Ke3 Ke6 31. g3 Ke5 32. f4 xf4 33. xf4 Ke6 34. h4 h5 35. Nd1 b5 36. Nb2 xa4 37. xa4 Bc6 38. f5 Kd7 39. Nc4 Bxa4 40. Nxa5 Kd6 41. Nc4 Kc6 42. Kd3 Bb5 43. Kc3 Kd7 44. Nb6 Kc6 45. Nd5 Bf1 46. Nxf6 Bg2 47. e5 Kc7 48. e6 Kd8 49. e7 Kc7 50. e8 Kb6 51. Nd7 Kc6 52. Ne5 Kd6 53. Qe6 Kc7 54. Qd7 Kb6 55. f6 c4 56. Nxc4 Ka6 57. Qc7 Kb5 58. Qb6 Ka4 59. Qb4

In the above game, some moves such as a "check" or last move Qb4 should have been Qb4# or at 23. Rxd8+ (signifying a check). Current implementation does not add '+' for a check or '#' for mate.

@rohandalvi
Copy link
Author

You probably might be aware of this already but the pgn provided by chessjs library returns these symbols. Not sure if you are using the pgn generated by that library.

@mliebelt
Copy link
Owner

See as an example http://mliebelt.github.io/PgnViewerJS/examples/edit.html where check and mate symbols are included. I think the reason for that is, that they have to be included in the original pgn code. I will check that, and add it then. So the viewer should be robust enough to add the symbols that are given by the context (check or mate).

@mliebelt mliebelt added the bug label Sep 17, 2016
mliebelt added a commit that referenced this issue Sep 17, 2016
…y flag when reading moves, so check and mate symbols may be wrong in the notation. They will be written in the output in all cases by using the SAN of the moves, not the original notation.
@mliebelt mliebelt self-assigned this Sep 18, 2016
mliebelt added a commit that referenced this issue Nov 2, 2016
…y flag when reading moves, so check and mate symbols may be wrong in the notation. They will be written in the output in all cases by using the SAN of the moves, not the original notation.

(cherry picked from commit f1357c4)
@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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants