If the king is in check by an enemy piece, block all input for friendly pieces except those that can prevent the check. For example, allow only the king to move if escaping is possible and king is the only option, or allow a bishop or any other piece to block the attack or capture the attacker.
If the king is in check by an enemy piece, block all input for friendly pieces except those that can prevent the check. For example, allow only the king to move if escaping is possible and king is the only option, or allow a bishop or any other piece to block the attack or capture the attacker.