Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Commit 33d8953

Browse files
Merge pull request #8 from pieterbrandsen/optimize
Optimize
2 parents 763b24a + 819adc9 commit 33d8953

File tree

3 files changed

+220
-126
lines changed

3 files changed

+220
-126
lines changed

SudokuSolver/Controllers/SudokuController.cs

+11
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,16 @@ public ActionResult CreateSudoku(Random rnd)
8484
TempData["sudoku"] = sudokuModel;
8585
return RedirectToAction("Sudoku");
8686
}
87+
88+
/// <summary>
89+
/// Creates a randomized guessing sudoku using the empty sudoku.
90+
/// </summary>
91+
/// <returns></returns>
92+
public ActionResult CreateSudokuGuessing(Random rnd)
93+
{
94+
sudokuModel.Cells = solver.CreateGuessing(SudokuList.ElementAt(2).Cells, rnd);
95+
TempData["sudoku"] = sudokuModel;
96+
return RedirectToAction("Sudoku");
97+
}
8798
}
8899
}

0 commit comments

Comments
 (0)