Make generator always produce possible puzzles

This commit is contained in:
2022-11-21 19:22:53 +00:00
parent 5ae7a18227
commit d6b9f3e2e5
2 changed files with 67 additions and 20 deletions

3
sud.h
View File

@@ -21,7 +21,6 @@
#include <stdbool.h>
#define SIDELEN 9
#define SEGLEN 3
#define NDIGITS 9
@@ -34,7 +33,7 @@ struct cellstate {
};
struct sudoku {
struct cellstate cells[SIDELEN][SIDELEN];
struct cellstate cells[NDIGITS][NDIGITS];
};
enum update_res { NOT_ALLOWED, ALREADY_DET, OK };