public void Step() { if (!solverGrid.IsSolved) { step = step.Perform(); } }
public bool SolveStep(SolveStep step) { var shouldWait = false; var savPos = Cursor.Position; RECT rc; GetWindowRect(Hwnd, out rc); Thread.Sleep(100); Cursor.Position = new Point(rc.Left + step.Cell.Center.x, rc.Top + step.Cell.Center.y); switch (step.NewState) { case CellState.Blue: DoLeftMouseClick(); break; case CellState.Black: shouldWait = true; DoRightMouseClick(); break; } Cursor.Position = savPos; return(shouldWait); }
public StepwiseSolver(SolverGrid solverGrid) { this.solverGrid = solverGrid; this.step = new SolveStep(() => RefineColumn(0)); }