public bool SudokuSharp(PuzzleSample puzzle) { var board = new SudokuSharp.Board(); for (int row = 0; row < 9; row++) { for (int col = 0; col < 9; col++) { if (puzzle.NullableMatrix[row, col].HasValue) { board.PutCell(new SudokuSharp.Location(col, row), puzzle.NullableMatrix[row, col].Value); } } } board = board.Fill.Randomized(); return(board.IsSolved); }
public bool SudokuSharp(PuzzleSampleCollection sampleCollection) { PuzzleSample sample = sampleCollection.Random(); var board = new SudokuSharp.Board(); for (int row = 0; row < 9; row++) { for (int col = 0; col < 9; col++) { if (sample.NullableMatrix[row, col].HasValue) { board.PutCell(new SudokuSharp.Location(col, row), sample.NullableMatrix[row, col].Value); } } } board = board.Fill.Sequential(); return(board.IsSolved); }