-
Notifications
You must be signed in to change notification settings - Fork 895
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
How to make illigal moves using chess.js? #434
Comments
Curious. How would this work?
Perhaps this is a frontend problem, not a chess.js one. |
|
It may be a bit of a case of us wanting our cake and eating it too. |
I can see the issue for illegal game states. For this to be useful there are two possible options. Either just turn off all rule checking for a game permanently (other than how the pieces move, algebraec notation etc). But then if you wanted to keep some rules selectively, the front end would have to manually validate them itself which would be a pain. Or alternatively have the ability to select which rules are turned on or off, but that's obviously pretty complicated for the scope of chess.js. It still seems like the only way to implement variants in chess.js, is to patch the source yourself in order to selectively remove certain validation checks. If you are just talking about moving pieces in a non-standard way, e.g. moving a knight in a straight line instead of an L-shape, in such a way where the resulting position is legal -- I guess that's hypothetically possible, to implement in chess.js, it would probably require storing the moves in the move list using some long notation instead of SAN. You could just use remove() and put(), then validate the FEN aftewards and have your own move list in the front end. Since for that use case there's not much use for chess.js. It's not hard to implement your own 3-fold repetition checking etc. |
Hi, I would like to know how to make illigal moves using this library,
I have seen sloppy:True, but it seems to be removed from the project.
The text was updated successfully, but these errors were encountered: