Esempio n. 1
0
 public void Step()
 {
     if (!solverGrid.IsSolved)
     {
         step = step.Perform();
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public StepwiseSolver(SolverGrid solverGrid)
 {
     this.solverGrid = solverGrid;
     this.step       = new SolveStep(() => RefineColumn(0));
 }