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); }
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"); } } }
public bool ClashesWithCurrentState(IndexedSlot s) { throw new System.NotImplementedException(); }