private bool RemoveUnsolvedValueFromCellsNotInSquare(ref Board board, int unsolvedValue, int squareNumber, CellData cells) { bool success = false; foreach (int cellIndex in cells.Keys) { if (GridMath.GetSquareForIndex(cellIndex) != squareNumber) { bool removalSucceeded = board.RemoveValueFromCell(cellIndex, unsolvedValue); success |= removalSucceeded; } } return(success); }
public void TestSquareForIndex(int index, int expectedSquare) { GridMath.GetSquareForIndex(index).Should().Be(expectedSquare); }