bug
If your previous move was c7-c5 then that's a legal move called en passant
https://support.chess.com/article/683-what-is-en-passant
If your previous move was c7-c5 then that's a legal move called en passant
https://support.chess.com/article/683-what-is-en-passant