timwoelfle/PlainChess

Managed to capture opponents king

mrkvicka22 opened this issue · 1 comments

King was on the 1st rank. King was threatened by a check by a rook. White moved knight to stop the check which was an illegal move as the knight already guarded the king from check by bishop. After the illegal knight move bishop captured the king to try whether it works and indeed it did.

getReachableFields should return a null if a position after any possible move generates a check (pinned piece).