jhlywa / chess.js

A TypeScript chess library for chess move generation/validation, piece placement/movement, and check/checkmate/draw detection
BSD 2-Clause "Simplified" License
3.72k stars 892 forks source link

#319: add null move functionality #451

Open ppeloton opened 8 months ago

ppeloton commented 8 months ago

Implemented null move logic for SAN '--' and added a simple test case. Please review, I am open for discussions!

jhlywa commented 8 months ago

Thanks for the PR @ppeloton.

This is a good start on the null move logic. A couple of random questions that I haven't really thought through yet:

I'd like to let this PR soak for a bit to let us (and others) ponder some of these questions. Thanks again for submitting!

ppeloton commented 7 months ago

@jhlywa : Happy to contribute and thank you for your good feedback and questions. Generally, I think that null moves do not have one common standard, so if we want to implement this in the package, the developers have to make choices and document how null moves are handled in chess.js

About your questions:

I am happy to continue the discussion!

ppeloton commented 7 months ago

Sorry, I forgot to run the prettify command. I hope now everything is fixed!