Is it true that at any time only one piece can put king in check? I am writing a simple chess game in which I have to determine the end game conditions. My algorithm requires the piece that is putting the opponent king in check, and checks the following:


King cannot escape
Piece cannot be eliminated
Path cannot be blocked


If all three conditions satisfy, then it is checkmate. However, I am wondering if there can be more than one piece simultaneously putting a king in check. It doesn't seem to be possible, but I can't come up with a proof for it. For example, is it possible for 2 rooks to put a king in check at the same time? Personally, I don't think that it's possible.
Double check is a fine tactic. An example would be a bishop lined up on the same diagonal as the king with a rook or knight in the way blocking the check. The rook or knight moves giving check to the king and also uncovering the check from the bishop. The king must move since there is no way to block two different lines or take two different pieces at the same time.