Closed svangordon closed 7 years ago
Thanks. I'm sure there was some reason for using findDOMNode, but I can't for the life of me remember what it was. Anyway, as long as it works ...
New Demo looks great.
~I have a question, though - what happens when more than 9 blank spaces are needed in FEN (for boards with more than 10 files) ? It only accepts the characters 0-9. I wonder if someone has already defined some extension to FEN to deal with this. (eg Hexadecimal would probably be confusing and risky to parse.)~
Actually, I think the system of just adding another number if more than 9 spaces are needed works fine. (ie the way it already works )
I notice that Draughts demo is already using 91 for blank ranks.
So, for example, if we need 11 blank spaces between two pawns on the same rank, it would be P92P
As long as it is understood that 92 means 9+2 = 11 and not ninety-two , it's all good !
Hey - these are my first pull requests, so I guess I've lost my open-source virginity too hehe !
Fixes linting errors, and spruces up the demo. Fixing the linting errors are pretty straight forward; the ReactDOM method
findDOMNode
is deprecated and so has been replaced.The demo has been laid out so that the whole thing is visible on one screen. Custom board sizes were actually introduced in the last pull request, so it's just leveraging existing functionality. Tests for custom board sizes are included in a different pull request.
As an aside, this is my first time contributing to an open source project, and it's super fun!