Page 889 - 2
P. 889
return false;
}
} catch (ArrayIndexOutOfBoundsException e) {
return false;
}
return true;
}
public boolean winCheckLD(int x, int y) {
try {
for (int i = y, z = x; i < y + 5; i++, z--) {
if (map[y][x] != map[i][z])
return false;
}
} catch (ArrayIndexOutOfBoundsException e) {
return false;
}
return true;
}
public boolean winCheckOneUp(int x, int y) { // 한칸 위쪽
try {
for (int i = y - 1; i < y + 4; i++) {
if (map[y][x] != map[i][x])
return false;
}
} catch (ArrayIndexOutOfBoundsException e) {
return false;
}
return true;
}
public boolean winCheckOneDown(int x, int y) { // 한칸 아래쪽
try {
for (int i = y + 1; i > y - 4; i--) {
if (map[y][x] != map[i][x])
return false;
}
} catch (ArrayIndexOutOfBoundsException e) {
return false;
}
return true;
}
public boolean winCheckOneRU(int x, int y) { // 한칸 오른쪽 위 대각선
- 889 -