public SudokuBoard(SudokuBoard other) { elements.Clear(); SudokuCell temp; foreach (SudokuCell cell in other.elements) { temp = new SudokuCell(); temp.Choices = cell.Choices; this.elements.Add(temp); } this.AssignHelpers(); }
private void GetPosition(SudokuCell cell, out int row, out int col, out int box) { row = 0; col = 0; box = 0; for (int x = 0; x < 9; x++) { if (this.rows[x].Contains(cell)) row = x; } for (int x = 0; x < 9; x++) { if (this.cols[x].Contains(cell)) col = x; } for (int x = 0; x < 9; x++) { if (this.boxs[x].Contains(cell)) box = x; } }
public SudokuCell DeepCopy() { SudokuCell temp = new SudokuCell(); temp.Choices = this.Choices; return temp; }