inspect  Bishops' 2 diagonal attacks end to end and going to your side of the board, end to end forming a  big ,<, >, X. You do not stop inspecting only the occupied squares
in a line but more on the vacant squares.  With Kings, you should also inspect the the entire diagonals, horizontals, verticals end to end of the board even if it can move only one square at a time and you might be able to take your opponent's queen doing this.

     Before making any move you have to inspect your opponent's queen, bishops and rooks lines of attacks