public SudokuPuzzle Clone() { var puzzle = new SudokuPuzzle(); for (var i = 0; i < 9; i++) { for (var j = 0; j < 9; j++) { Cell cell; if ((cell = GetCell(i, j)).Value != null) { puzzle.SetCellValue(i, j, cell.Value.Value); } } } return(puzzle); }