int ft_check(int maxline, int maxcol, int line, int col) { if (ft_check_line(maxcol, line) == 1 || ft_check_col(maxline, col) == 1) return (1); else return (0); }
int ft_new_number(int n, int pos, char tab[9][9]) { while (n++ <= 9) { if (ft_check_line(n, pos, tab) == 0 && ft_check_col(n, pos, tab) == 0 && ft_check_block(n, pos, tab) == 0) { tab[pos / 9][pos % 9] = n; return (1); } } return (0); }