sudoku: main: solve grids using heuristics
This commit is contained in:
parent
e89f6bdf51
commit
547972417b
17
src/main.c
17
src/main.c
|
@ -1,7 +1,18 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
puts("Hello world");
|
||||
#include "constraints.h"
|
||||
#include "solver/solve.h"
|
||||
#include "sudoku.h"
|
||||
|
||||
return 0;
|
||||
int main(void) {
|
||||
struct sudoku grid;
|
||||
|
||||
if (!parse_grid_file(&grid, stdin))
|
||||
return 1;
|
||||
|
||||
solve(&grid);
|
||||
|
||||
print_grid(&grid, stdout);
|
||||
|
||||
return !solved(&grid);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue