int compte_occurence_region(Sudoku s, int region, int val, int *case_sudoku) { int cpt=0; int j=0 ; /* Indice de la case */ int i; /* I, on se positionne au coin supérieur gauche */ if(region>=4 && region <7) j=18; if(region>=7) j=36; i=(region-1)*3+j; while(i<(region-1)*3+21+j) { if(recherche(s->grille[i].candidat,s->grille[i].nb_candidats,val)!=9) { cpt++; if(cpt==1) *case_sudoku=i; /* On note sa position et on incremente plus tard */ } if((i+1)%3==0) i=i+7; else i++; } return cpt; }