i was going to do something along the lines of
Code:
while (NumcellsSolved < 81 )
{
int x = NumcellsSolved;
NumcellsSolved += NakedSingles( PossibleNums, Solution );
NumcellsSolved += HiddenSingles( PossibleNums, Solution );
//printf("number of solved cells is %d\n", NumcellsSolved);
while ( 1 )
{
if ( LockedNumbers ) { x = 0; break; }
if ( some other functions ) { x = 0; break; }
break; //no x = 0 here so outer loop breaks
}
if (x == NumcellsSolved ) break;
}
all the functions inside the while (1) loop will do is eliminate possible numbers it is down to naked and hidden singles to solve the grid