diff options
author | David Phillips <david@sighup.nz> | 2019-03-11 15:54:42 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-03-11 15:55:07 +1300 |
commit | 734c30391d96c4cb74e328f94b05b33b4e2db98a (patch) | |
tree | 5862150f7dc00779de65abe0437f9207bd7d309d /update.c | |
parent | 8332bbe7b59f9a83e074760c886592da907d012d (diff) | |
download | sudoku-734c30391d96c4cb74e328f94b05b33b4e2db98a.tar.xz |
Replace cumbersome arrays with bitmasks
Diffstat (limited to 'update.c')
-rw-r--r-- | update.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -25,8 +25,8 @@ void update_not_row_col(struct cell (*b)[9][9]) DEBUG_LOG("Update: (%d,%d) has value %d\n", x, y, val); for (i = 0; i < 9; i++) { - (*b)[i][y].not[val - 1] = 1; - (*b)[x][i].not[val - 1] = 1; + CELL_SET_NOT((*b)[i][y].not, val); + CELL_SET_NOT((*b)[x][i].not, val); } } } |