Make fill proportion a parameter to gen()

This commit is contained in:
2022-11-23 17:56:12 +00:00
parent 71db045c9f
commit 37e7c6481a
3 changed files with 11 additions and 11 deletions

5
sud.h
View File

@@ -41,9 +41,10 @@ enum update_res { NOT_ALLOWED, ALREADY_DET, OK };
enum check_res { INCOMPLETE, INCORRECT, SOLVED };
/**
* Populate the sudoku with some random values.
* Populate the sudoku with some random values. The proportion of
* cells that are filled will be approximately `fill_prop`.
*/
void gen(struct sudoku *sud);
void gen(struct sudoku *sud, double fill_prop);
/**
* Attempt to update the cell at row `r`, column `c` to have the value