ajax333221 / isepic-chess

♞ JavaScript chess utility library.
MIT License
16 stars 3 forks source link

Reminder that v8.0.0 changes discards en passants in FENs a little too early #28

Open ajax333221 opened 2 years ago

ajax333221 commented 2 years ago

Note to self: these changes caused to stop invalidating some positions with wrong en passant squares, discarding them in the basic fen test and not allowing it to get tested properly in the refined fen test.

While this is not a problem per se, it allows some unintended flexibility for now. But the loaded FEN will not accidentally ever accept bogus En passant squares as they eventually do get passed through the refined fen test.

ajax333221 commented 1 year ago

These were on a list "illegal FEN that passes basic fen test":

        /*these are now legal in v8.0.0 because the en passant gets discarded
            before there is the chance to validate it. The positions will be loaded
            without the bad en passant though, so it's all good and very low priority*/

            //8/8/2K5/8/6P1/2k5/8/8 w - g3 0 1
            //8/8/2K5/6p1/6P1/2k5/8/8 b - g6 0 1
            //8/8/2K5/8/8/2k5/8/8 w - g6 0 1
            //8/8/2K3N1/6p1/8/2k5/8/8 w - g6 0 1
            //8/8/2K3N1/6p1/6P1/2k3n1/8/8 b - g3 0 1
            //8/8/2K5/8/6p1/2k5/8/8 w - g3 0 1
            //8/8/2K5/6P1/8/2k5/8/8 b - g6 0 1