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

Prevent endless loops while simulating checkmate. #18

Open
radi-cho opened this issue May 1, 2020 · 1 comment
Open

Prevent endless loops while simulating checkmate. #18

radi-cho opened this issue May 1, 2020 · 1 comment
Labels
bug Something isn't working enhancement New feature or request in progress

Comments

@radi-cho
Copy link
Member

radi-cho commented May 1, 2020

Castling and En-passant simulation may cause endless loops if the board is not loaded with the standard chess positioning.

@radi-cho
Copy link
Member Author

radi-cho commented May 1, 2020

For example: The code validating castling possibility may result in endless loop in some games loaded from FEN strings: pieces.js#L309. xx < 8 && should be added to validate xx does not exceed 8. If it does, the loop becomes obsolete because the board doesn't support x to be greater than 7.

@radi-cho radi-cho added bug Something isn't working enhancement New feature or request in progress labels May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request in progress
Projects
None yet
Development

No branches or pull requests

1 participant