From 3d7a40cc5806f1b88c589134484a4461f8219927 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Wed, 23 Nov 2022 22:31:39 +0000 Subject: [PATCH] Remove validity check from update() --- sud.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sud.c b/sud.c index 364a9ba..172dfe6 100644 --- a/sud.c +++ b/sud.c @@ -116,12 +116,6 @@ enum update_res update(struct sudoku *sud, unsigned r, unsigned c, unsigned val) unsigned tr, tc; assert(val < NDIGITS); - /* Check that the cell is undetermined and the value is allowed. */ - if (sud->cells[r][c].det) - return ALREADY_DET; - if (!sud->cells[r][c].pvals[val]) - return NOT_ALLOWED; - /* Update possible values of cells in same column. */ for (tr = 0; tr < NDIGITS; ++tr) { if (tr == r || sud->cells[tr][c].det)