Beispiel #1
0
 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();
 }
Beispiel #2
0
 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;
     }
 }
Beispiel #3
0
 public SudokuCell DeepCopy()
 {
     SudokuCell temp = new SudokuCell();
     temp.Choices = this.Choices;
     return temp;
 }