chess-blindfold icon indicating copy to clipboard operation
chess-blindfold copied to clipboard

case sensitivity fixed

Open chessripper16 opened this issue 2 years ago • 2 comments

If we give an input like 'rd2' the app would show that it is not valid since it is expecting 'Rd2' for Rook to d2. I have made a fix to auto capitalize the first letter of every move except the pawn move as shown in the code. Fortunately we can capitalize k, q, n and r directly and issue comes only at b-file pawn move(b) and bishop move(B). I have accommodated that condition too.

I believe this would make input giving much easier. Please do check this.

PS: I am a complete noob in JS. I usually code in Python. Correct me if I am wrong :)

chessripper16 avatar Aug 14 '22 14:08 chessripper16

Thanks for the PR, I like making it easier for users! And apologies for the late response, for some reasons this got drowned in other messages.

Could you add a unit test here? That'd be required before merging any change. Thanks!

cgoldammer avatar Oct 14 '22 15:10 cgoldammer

Reviewing now. I like this in theory, let me think if there's some corner cases that are tricky.

cgoldammer avatar Mar 22 '23 01:03 cgoldammer