예제 #1
0
파일: sudoku.c 프로젝트: Fittings/Sudoku3DS
//Creates a unique set-up initially
Sudoku sudoku_unique_setup(int n, int percentage, int seed) {
	Sudoku u_sudoku = sudoku_new(n, seed);
	sudoku_default(u_sudoku);
	sudoku_transform(u_sudoku);
	sudoku_delete_space(u_sudoku, percentage);
	return u_sudoku;
}
예제 #2
0
int main(void)
{
  int n, m, i, j;
  int **A;
  ecp *p;

  /* load problem */
  printf("\nProblem\n");
  sudoku *s = sudoku_new(stdin);
  sudoku_show_problem(stdout, s);

  /* solve */
  printf("\nAnswer\n");
  sudoku_solve(s);
  sudoku_show_answer(stdout, s);

  /* free */
  sudoku_free(s);

  return 0;
}