public void Add(IndexedSlot s)
 {
     for (int i = 0; i < s.ColumnSpan; i++)
     {
         _stateRows[s.RowIndex][s.ColumnIndex + i]++;
     }
 }
 public bool ClashesWithCurrentState(IndexedSlot s)
 {
     for (int i = 0; i < s.ColumnSpan; i++)
     {
         if (_stateRows[s.RowIndex][s.ColumnIndex + i] > 0)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #3
0
 public void Add(IndexedSlot s)
 {
     for (int i = 0; i < s.ColumnSpan; i++)
     {
         var targetCell = _stateCells.Find(
             x => x.RowIndex == s.RowIndex &&
             x.ColumnIndex == s.ColumnIndex + i
             );
         if (targetCell != null)
         {
             targetCell.CellValue++;
         }
         else
         {
             throw new Exception("Target cell shouldn't be null");
         }
     }
 }
예제 #4
0
 public bool ClashesWithCurrentState(IndexedSlot s)
 {
     throw new System.NotImplementedException();
 }