예제 #1
0
파일: Logic.cs 프로젝트: varu87/SuDoKu
 /// <summary>
 /// Generate the puzzle grid based on a difficulty level
 /// </summary>
 /// <param name="difficulty"></param>
 /// <returns>Grid</returns>
 public string[] GeneratePuzzle(Level difficulty)
 {
     string[] puzzle = new string[2];
     Grid grid = new Grid(difficulty);
     puzzle[0] = TerminalPattern(grid.GenerateTerminalPattern());
     puzzle[1] = PuzzleGrid(grid.DigHoles(RandomSequence()));
     return puzzle;
 }
예제 #2
0
파일: Logic.cs 프로젝트: varu87/SuDoKu
 /// <summary>
 /// Generate the puzzle grid with an arbitrary number of 'givens'
 /// </summary>
 /// <returns>Grid</returns>
 public string GeneratePuzzle()
 {
     Grid grid = new Grid();
     grid.GenerateTerminalPattern();
     return PuzzleGrid(grid.DigHoles(RandomSequence()));
 }