public void ToIntArrayTest() { var sudokuPuzzle = new SudokuPuzzle(_sudoku); var result = sudokuPuzzle.ToIntArray(); CollectionAssert.AreEqual(result, _sudoku); }
private SudokuPuzzle GetDeepCopy(SudokuPuzzle sudokuPuzzle) { var copy = new SudokuPuzzle(sudokuPuzzle.ToIntArray()); foreach (var cell in sudokuPuzzle.Cells) { if (!cell.HasValue) { var cellInCopy = copy.Cells[cell.RowIndex, cell.ColumnIndex]; cellInCopy.CanBe.Clear(); cellInCopy.CanBe.AddRange(cell.CanBe); } } return(copy); }