Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to #476, but more generically, it fixes the board CSS class manipulation for the following (on top of piece style):
If I'm not wrong, all of them are now using
divBoard.classList.add
, which makes it end up in a situation where more than one exclusive value is present (more details in the aforementioned pull request), breaking the application.You'll see I did the trick with a some TypeScript generics, in order to re-use code, but I'd be happy to simplify if by copy-pasting one function for each type. Similar for the enums, and for the heuristics. I'll be happy to apply any code suggestion you have that achieves the same behavior, but that's the best I could do so far.
I hope it helps! At least, it would really unblock the use I'm planning to for this amazing library! 💟
Thanks!