-
Notifications
You must be signed in to change notification settings - Fork 18
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
Check highlight while viewing history when PGN starts with the king being in check does not work #251
Comments
Unfortunately, to actually address this bug would require either a PR with Currently the One change that could be made with the way The other approach would be to change the way history is handled in So of the two approaches, I feel it would definitely be preferable to submit a PR with And apologies, but I must add one tiny bit of pedantry: your statement |
Actually, I suppose there is a third approach: a hacky edgecase check bugfix. When initialising a board, we could check whether the first move is a check/checkmate by creating a separate |
Describe the bug
Check highlight while viewing history when PGN starts with the king being in check does not work
Which version are you using
1.3.3
To Reproduce
Steps to reproduce the behavior:
loadPgn
with a custom FEN where the king is initially in checkExpected behavior
Check should be highlighted like in all other cases.
Screenshots
Additional context
The issue comes from the fact that to determine whether or not the king is in check in any history position, the SAN of the previous move is examined and if it contains
#
or+
, then the king must be in check after the move is performed.This is the problematic line:
vue3-chessboard/src/classes/BoardApi.ts
Line 706 in 77c704e
The text was updated successfully, but these errors were encountered: