Save results to file instead of checking puzzles while solving

This commit is contained in:
2022-11-24 13:47:08 +00:00
parent 810ad45669
commit 072c3db45b
3 changed files with 46 additions and 23 deletions

5
sud.h
View File

@@ -47,6 +47,11 @@ enum check_res { INCOMPLETE, INCORRECT, SOLVED };
*/
bool load(struct sudoku *sud, const char *ptr);
/**
* Write the sudoku to the given pointer (`NCELLS` bytes).
*/
void save(struct sudoku *sud, char *ptr);
/**
* Attempt to update the cell at row `r`, column `c` to have the value
* `val`. Returns `OK` on success, `ALREADY_DET` if the cell is