subject

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;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
You know the right answer?
Code works, need help writing header file. /**
*
* TODO -- Add method header comments<...
Questions
question
Mathematics, 08.10.2019 07:20
question
Social Studies, 08.10.2019 07:30