Я создаю средство проверки судоку, а также средство проверки строк и столбцов. В настоящее время я пытаюсь сделать проверку блоков (блок 3x3). Любое понимание этого было бы здорово.
public boolean checkBlock (int col0to2, int row0to2)
{
int [] tempArray = new int [3];
for (int x=0; x<3; x++)
{
for (int y=0; y<3;y++)
{
if ((board [col0to2+x][row0to2+y]) > 0 && (board [col0to2+x][row0to2+y]) < 10)
{
int tempVal = board [col0to2+x][row0to2+y];
tempArray [tempVal - 1] = tempVal; // i think this line is giving me the run
// error
}
}
}
return true;
}