No, dopsal jsem to takto a nefunguje to
int volne_pole_cislo(int cislo, int radek, int sloupec)
/**********************/
{
/* Test if the number is already in
the line, or the column, or the sub-square of 3 X 3
afferent at the cell pointed to by line and column. */
char buffer[MAX + 10];
int i, j, k, l, m, n;
for (i = 0; i < MAX; i++) if (sudoku[radek][i] == cislo) return(FALSE);
/* If the number is used in the line return FALSE */
for (i = 0; i < MAX; i++) if (sudoku[i][sloupec] == cislo) return(FALSE);
/* If the number is used in the column return FALSE */
for (i = 0; i < MAX - 1; i++) {
if ( sudoku[i][i] == 0 ) continue;
for (j = i + 1; j < MAX; j++) {
if (sudoku[j][j] == sudoku[i][i]) return (FALSE);
}
}
for (i = 0; i < MAX - 1; i++) {
k = 8;
m = 0;
m = k - i;
if ( sudoku[i][m] == 0 ) continue;
for (j = i + 1; j < MAX; j++) {
n = 8;
l = 0;
l = n - j;
if (sudoku[j][l] == sudoku[i][m]) return (FALSE);
}
}
/* If the number is used in the sub-square of 3 X 3 return FALSE */
transformuj_ctverecek_poli(buffer, radek, sloupec);
for (i = 0; i < MAX; i++) if (buffer[i] == cislo) return (FALSE);
/* whereby the number is available for the cell, return TRUE. */
return(TRUE);
}/* end free_cell_for_number */