lichess.org
Donate

Non-recursive check testing

Hi all,
I have a rather unusual question regarding checks. When a move is probed for king check, no such testing for opponent is needed. In a position like this: 8/1k6/8/1p6/8/3K4/8/1R6 w - - white can't move king to c4. This basically means that for a piece attacking opponent's king has more priority than defending its own. Why is it so?
Because you can't put your king under check, even if it means checking the other king. This can happen through a discovered check with the king in a game, which is illegal if it puts one's own king in danger.
rj1997, thanks for the explanation, but my question is about the reverse situation. When allowed moves for a king are listed, there are no moves to squares which are attacked by your opponent's pieces, however those pieces are themselves pinned by discovered check. That means they can't actually attack your king, and the threat is virtual. Unless they could attack at the expense of opening a discovered check for their own king.
Even if your opponent's piece is pinned and can't move, it's still illegal to move the king to a square that the piece could attack if it weren't pinned.

The reasoning for this rule is that although the piece is pinned, if it "captured" your king, the game would be over, even if in the process of capturing your king, it puts their own king in danger.
v64, you answered my question in great detail, thank you.
If it makes you feel better you could think of your king is killed 'first', and the oponent gets taken one move later. So it should be clear who won the game.

This topic has been archived and can no longer be replied to.