public bool SolveStep(Nonogram n) { bool madeChanges = false; for (int y = 0; y < n.height; y++) { var row = n.Row(y); foreach (var t in techniques) { madeChanges |= t.Apply(row); } } for (int x = 0; x < n.width; x++) { var col = n.Column(x); foreach (var t in techniques) { madeChanges |= t.Apply(col); } } return(madeChanges); }
public bool Solve(Nonogram n) { while (SolveStep(n)) { ; } return(n.IsComplete()); }