Tracking how many pieces are crossed. Also checking it in decision of Rook move validitiy