Rook movement function not finding interruptions
问题 I am trying to write a function that checks if the black king is in check by the white rook. The problem occurs when I try to search if there are any pieces in between the rook and the king. void rook_white(piece A[]) // does WR check BK { cout << "Found White Rook "; int k_x; // BK'S x coordinate int k_y; // BK's y coordinate bool check = false; for(int x=0; x<8; x++) { for(int y=0; y<8; y++) { if(A[t_i].field[m_x-x][m_y] == 'k') // Moving Left { k_x=m_x; k_y=m_y; goto al_1; } } } for(int x