the question is this.
suppose that i have got
rowstart=8
rowend=6
columnstart=8
columnend=8
b=0
while(pieces[rowStart-b][columnStart]==null && pieces[rowStart-b][columnStart]!=pieces[rowEnd][columnEnd] && pieces[rowEnd][columnEnd]==null){ // CHECKS THE UPPER ROW.
b++;
}