user25423: I am not a chess player but I have a homework where I have to code a chess program. I would like to know if it is possible for a player's piece to be in check, the player to move out of check, and in turn put the other player in a stalemate, from just one move?
For example: White is in check -> White moves out of check -> Black is stalemated
I haven't found any examples of it so far, but I also haven't found anything saying it's never possible, so if anyone can say either way that would be great!

user15223: It's possible, e.g.
[FEN "2Q4k/2R4b/8/8/8/8/K7/8 b - - 0 1"]

1...Bg8+
2. Ka3?? 1/2-1/2


25423: <p>I am not a chess player but I have a homework where I have to code a chess program. I would like to know if it is possible for a player's piece to be in check, the player to move out of check, and in turn put the other player in a stalemate, from just one move?</p>
<p>For example: White is in check -&gt; White moves out of check -&gt; Black is stalemated</p>
<p>I haven't found any examples of it so far, but I also haven't found anything saying it's never possible, so if anyone can say either way that would be great!</p>
 15223: <p>It's possible, e.g.</p>
<pre><code>[FEN &quot;2Q4k/2R4b/8/8/8/8/K7/8 b - - 0 1&quot;]

1...Bg8+
2. Ka3?? 1/2-1/2
</code></pre>
