This implementation should apply the checking rule. So it should not even be possible to move your King into check, which means it can also never be captured. The general Jocly code for chess-like games enforces this, and I did not think it was worth the trouble to change it. You could consider it a bit of computer help, which it prevents you to do moves that immediately lose. Compared to the amount of help you already get by only being allowed to play pseudo-legal moves it doesn't seem very important.
This implementation should apply the checking rule. So it should not even be possible to move your King into check, which means it can also never be captured. The general Jocly code for chess-like games enforces this, and I did not think it was worth the trouble to change it. You could consider it a bit of computer help, which it prevents you to do moves that immediately lose. Compared to the amount of help you already get by only being allowed to play pseudo-legal moves it doesn't seem very important.