Code works, need help writing header file.
/**
*
* TODO -- Add method header comments
*/
public static boolean isWinningCoord(int x, int y, int[][] b, int z) {
if(x >= BOARD_HEIGHT || x = BOARD_WIDTH || y 0 && b[x - 1][y] == -1)) {
return false;
}
{ // Vertical
int count = 0;
for(int i = x - 1; i >= 0; i--) {
if(b[i][y] != z) {
break;
} else {
count++;
}
}
if(count >= CONNECT_WIN - 1) {
return true;
}
}
{ // Horizontal
int count = 0;
for(int i = y - 1; i >= 0; i--) {
if(b[x][i] != z) {
break;
} else {
count++;
}
}
for(int i = y + 1; i = CONNECT_WIN - 1) {
return true;
}
}
{ // Diagonals
int countNegSlope = 0;
for(int i = x + 1; i = 0; j--){
if(b[i][j] != z) {
break;
} else {
countNegSlope++;
}
}
}
for(int i = x - 1; i >= 0; i--){
for(int j = y + 1; j = CONNECT_WIN - 1) {
return true;
}
int countPosSlope = 0;
for(int i = x + 1; i = 0; i--){
for(int j = y - 1; j >= 0; j--){
if(b[i][j] != z) {
break;
} else {
countPosSlope++;
}
}
}
if(countPosSlope >= CONNECT_WIN - 1) {
return true;
}

}
return false;
}

Respuesta :

Answer:

kbfbnmcj hbx nmjn mz kjn  mj     hk hhhhhhgdhggbddddddbvgfcgfctrctgvhyubujbnjinkikmokimloplkmkojihgftrdesw3l,kmjinhuygtfrde4sw34drftyghuijokkkkkkkkkkkkkkkijjjjjjjkopl[[[[[koiju98hytttttttttttttuhiouhygdtrsgyuihkl;;ihugydtrcfbhjklioutrcgfbhjkloiuytdrhjukliuytrdgfhjkiouy7gfhjklpoiudtrkhjl;[poiughjbnm,;lkihuygtfvbnmjkiuytfgchvbnmkjlhuygfdc vbnhnjkygtdsfxghbjkiuhytrdgfhjuioytrdfgchbnmkloiuytfdfghjiouyyyyyyhjkpoi8u97t6rdghjuo0987hjklpo0i98uyghjbkopiuyhjbnkploiuhyjbnmkloiuhygbvjnmk,l;oipuhgbjkn mjhuygfvbnhjkiouuuukjopipkjmloiujoklm;okjm,kloiuhjnmkiuhjbkiuygfhuji8yghyugfvhjkjiuhygfhuijokpiuyt67u89poiuhygftduhjklphuytfrdesdtgyuhi;lkyuuuugij'[;;;;;;;;;;;;;;;;;;;;okpuuuutyyyyy[poiudtryuiop[;oiudtrruiooooooooytg[pl;oiuhygtfffkjjjjhugvcfxkml,;kjnhbgvchbjnk,lijuhygfcbvh nmmpoiugyhjb,m ./[poiuhbjnm,k;lijuytfrcgbvhkjlipouuuujipouuuukliouygkjliubhjkml

Explanation: