-
Notifications
You must be signed in to change notification settings - Fork 406
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
Feature request: allow boards smaller than 8x8 #198
Comments
Hello, Any chance to see this nice feature in a next release? Thanks in advance and have a nice day. |
My PR #199 the implements this
(works correctly). Considering I got no comments on it, it's unlikely for
it to be merged (which is understandable).
Feel free to fork it.
…On Thu, Jun 10, 2021, 16:16 slolo2000 ***@***.***> wrote:
Hello,
Any chance to see this nice feature in a next release?
Thanks in advance and have a nice day.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#198 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH4W2OY3YL2LSCS3H46OQ3TSDCLHANCNFSM4QPTYQMQ>
.
|
I do not have any plans to add this to chessboard.js at this time (that does not mean "never", just "not right now"). @ivan444 solution looks like a good fix if you need this ASAP 👍 🤓 |
Maybe if the chess.js library implemented this feature then it would make more sense in chessboardjs. Anyway, thanks a lot for your answer. |
I have had look to the PR #199 var config = {position: fenString, numRows: 6, numColumns: 6}; It works well and it display a board with 6x6 like expected. This issue is due to the validFen function which does not take care of board dimensions. @ivan444 Do you think you could add this to your PR #199 ? Like that the ability to create smaller boards will be fully functional and will be add to chessboardjs, I hope. |
That's intentional, as FEN string by definition is 8 characters long. Some assumptions break when using it for smaller boards. My bad for not making it clear in the PR description |
You are right for the FEN string definition. But for example, this one is valid on a 6x6 board:
And it could be really useful to support small board for young players when they have to solve chess problems. |
Maybe a first step to fully support smaller boards than 8x8 Based on your works @ivan444 I have completed validFen, fenToObj and objToFen functions in order to take in consideration config._boardDimension |
I don't know how to merge my code into your PR and I am not really sure about my code addition. |
@slolo2000 I meant that @oakmac merge PR #199 to the main repo. You can then add your change base in the main repo. Or you can fork my fork of the repo and create PR based on that (I recomment the former). |
Always based on @ivan444 work, I have completed my previous work on "support for smaller boards" I use it without problem and it seems to work quite nice. You can even use this feature with chess.js using a piece of code like below in order to "normalize" your fen string.
|
Some games require boards which are smaller than 8x8. Add ability to create smaller boards. Controll it via config.
I'll send a PR.
The text was updated successfully, but these errors were encountered: