jayasurian123 / fen-validator

Validate the Chess FEN notation
10 stars 3 forks source link

Returns true to "r1bqkbnr/pp1p1ppp/4p3/2p1n3/2K1P3/2N5/PPPP1PPP/R1BQ1BNR b kq - 0 9" #37

Open pronode opened 4 months ago

pronode commented 4 months ago

... which is wrong - black side is to move but white king is in check.

jayasurian123 commented 4 months ago

Hi, this does not comes under FEN notation validation. Depends on the rule of the chess game this may vary. FEN is only to state the position of the chess pieces on the board.

If one is working with "standard Chess rules", this has to be validated there checking next move is allowed or not with the rules.

for reference, we are validating only 6 rules specified here. https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation#cite_note-pgn_spec-1