#include "cell.h" #include "debug.h" /* * update_not_row_col * * For each unsolved cell on the board, update its list of values that it * cannot be based on the solved cells in the same row or the same column * Does not attempt to solve cells */ void update_not_row_col(struct cell (*b)[9][9]) { int x = 0; int y = 0; int i = 0; int val = 0; for (y = 0; y < 9; y++) { for (x = 0; x < 9; x++) { val = (*b)[x][y].val; if (val != 0) { DEBUG_LOG("Update: (%d,%d) has value %d\n", x, y, val); for (i = 0; i < 9; i++) { CELL_SET_NOT((*b)[i][y].not, val); CELL_SET_NOT((*b)[x][i].not, val); } } } } }