private bool RemoveFromOtherBoxesInRegion(MutablePuzzle puzzle, Region region, SudokuValues value, int boxIndex) { var anyChanged = false; for (int i = 0; i < Puzzle.LineLength; i++) { var coords = region.GetCoordinate(i); if (coords.Box == boxIndex) { continue; } var cell = region[i]; if (!cell.IsSingle && cell.HasAnyOptions(value)) { var update = new CellUpdate(value, coords); puzzle.RemoveOptions(update); anyChanged = true; } } return(anyChanged); }
public void RemoveOptions(CellUpdate update) => RemoveOptions(update.Coordinate, update.RemovedOptions);