コード例 #1
0
 /// <summary>Constructor.</summary>
 /// <param name="board">Reference to board possessing this cell.</param>
 /// <param name="id">Identifier for this cell.</param>
 /// <param name="values">Values for this cell to hold.</param>
 public Cell(Board board, int id, params int[] values)
 {
     _id = id;
     _board = board;
     if (values == null) {
         Values = new List<int>(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 });
         _setSingleValue = false;
     }
     else {
         Values = new List<int>(values);
         if( Values.Count == 1 ) {
             _setSingleValue = true;
         }
     }
 }
コード例 #2
0
 // Constructors
 /// <summary>Default constructor.</summary>
 public Cell(Board board, int id)
     : this(board, id, null)
 {
 }