src/puzzle.cpp
// doing assignments matching expected rating if any
//    LastCell=10,		 last cell in row column box
//    SingleBlock=12,    single box
//    Single_R_C=15,     single row column
//    NakedSingle=23,	 cell one candidate 
doing assignments matching expected rating if any
LastCell=10,                 last cell in row column box
SingleBlock=12,    single box
Single_R_C=15,     single row column
NakedSingle=23,      cell one candidate
doing assignments matching expected rating if any LastCell = 10 last cell in row column box SingleBlock = 12 single box Single_R_C = 15 single row column NakedSingle = 23 cell one candidate
int PUZZLE::FaitDirects(int rating) {
	if(stop_rating)
		return 1; 
	int ir = 0;
	for(int i = 0; i < 81; i++) {
		char c1 = fix[i], c2 = fixt[i];
		if(c1 - '0') {     
			int ok = 0;
			const CELL_FIX &p = cellsFixedData[i];
			switch(rating) {
			case 10:
				if((DIVF::N_Fixes(gg.pg,p.el) == 8) 
					|| (DIVF::N_Fixes(gg.pg,p.pl+9) == 8)
					|| (DIVF::N_Fixes(gg.pg,p.eb+18) == 8))
					ok = 1;
				break;
			case 12:
				if(alt_index.tchbit.el[p.eb + 18].eld[c1 - '1'].n == 1)
					ok = 10;
				break;
			case 15:
				if(alt_index.tchbit.el[p.el].eld[c1 - '1'].n == 1)
					ok = 1;
				if(alt_index.tchbit.el[p.pl + 9].eld[c1 -'1'].n == 1)
					ok = 1;
				break;
			case 23:
				if((gg.pg[i] == '0') && (T81t[i].v.ncand == 1))
					ok = 1;
				break;
			}
			if(ok)
				ir += FaitGo(i, c1, c2); 
		}
	}
	EE.Enl();
	if(ir)
		cReport();
	return ir;
}
int PUZZLE :: FaitDirects ( int rating ) { if ( stop_rating ) return 1 ; int ir = 0 ; for ( int i = 0 ; i < 81 ; i ++ ) { char c1 = fix [ i ] , c2 = fixt [ i ] ; if ( c1 - ' ' ) { int ok = 0 ; const CELL_FIX & p = cellsFixedData [ i ] ; switch ( rating ) { case 10 : if ( ( DIVF :: N_Fixes ( gg . pg , p . el ) == 8 ) || ( DIVF :: N_Fixes ( gg . pg , p . pl + 9 ) == 8 ) || ( DIVF :: N_Fixes ( gg . pg , p . eb + 18 ) == 8 ) ) ok = 1 ; break ; case 12 : if ( alt_index . tchbit . el [ p . eb + 18 ] . eld [ c1 - ' ' ] . n == 1 ) ok = 10 ; break ; case 15 : if ( alt_index . tchbit . el [ p . el ] . eld [ c1 - ' ' ] . n == 1 ) ok = 1 ; if ( alt_index . tchbit . el [ p . pl + 9 ] . eld [ c1 - ' ' ] . n == 1 ) ok = 1 ; break ; case 23 : if ( ( gg . pg [ i ] == ' ' ) && ( T81t [ i ] . v . ncand == 1 ) ) ok = 1 ; break ; } if ( ok ) ir += FaitGo ( i , c1 , c2 ) ; } } EE . Enl ( ) ; if ( ir ) cReport ( ) ; return ir ; }
doing assignments matching expected rating if any
LastCell=10,                 last cell in row column box
SingleBlock=12,    single box
Single_R_C=15,     single row column
NakedSingle=23,      cell one candidate
doing assignments matching expected rating if any LastCell = 10 last cell in row column box SingleBlock = 12 single box Single_R_C = 15 single row column NakedSingle = 23 cell one candidate
// donc fixée // filter on rating expected