private void Hint(bool perform) { Mesh hintMesh = new Mesh(loopDisplay1.Mesh); hintMesh.ConsiderIntersectCellInteractsAsSimple = true; hintMesh.ConsiderMultipleLoops = true; hintMesh.IterativeSolverDepth = 0; hintMesh.IterativeRecMaxDepth = 1; hintMesh.UseColoring = false; hintMesh.UseCellPairs = false; hintMesh.UseCellPairsTopLevel = false; hintMesh.UseEdgeRestricts = false; hintMesh.UseCellColoring = false; hintMesh.UseDerivedColoring = false; hintMesh.UseMerging = false; hintMesh.UseIntersectCellInteractsInSolver = true; List<IAction> changes = new List<IAction>(); hintMesh.PerformStart(changes); while (changes.Count == 0) { hintMesh.GetSomething(changes); if (hintMesh.IterativeSolverDepth > 10) break; hintMesh.IterativeSolverDepth = hintMesh.IterativeSolverDepth + 1; } if (changes.Count > 0) { if (perform) loopDisplay1.Perform(changes[0]); else loopDisplay1.Flash(changes[0]); } }
private static void AutoStart(Mesh newMesh) { newMesh.ColoringCheats = false; newMesh.UseColoring = Settings.Default.UseColoringInAuto; newMesh.UseCellPairs = Settings.Default.UseCellPairsInAuto; newMesh.UseCellPairsTopLevel = false; newMesh.UseEdgeRestricts = Settings.Default.UseEdgeRestrictsInAuto; newMesh.ConsiderIntersectCellInteractsAsSimple = Settings.Default.UseICinAuto; newMesh.ConsiderMultipleLoops = Settings.Default.ConsiderMultipleLoopsInAuto; newMesh.UseCellColoring = Settings.Default.UseCellColoringInAuto; // TODO: add 'in auto' settings. newMesh.UseMerging = false; newMesh.UseDerivedColoring = false; List<IAction> backup = new List<IAction>(); newMesh.PerformStart(backup); }