public void DragMap()
        {
            FastCheck fc = new FastCheck();

            fc.Bounty();
            Rat.DragnDropSlow(PointsAndRectangles.dragMapS, PointsAndRectangles.dragMapE, 8);
        }
        private void UseFilter(Point cls)
        {
            FastCheck fc = new FastCheck();

            do
            {
                Rat.Clk(PointsAndRectangles.filter);
                Thread.Sleep(1000);
            } while (!fc.FilterIsOpenned());//100% FilterOpenner
            Thread.Sleep(200);
            Rat.Clk(PointsAndRectangles.clear);
            Thread.Sleep(1000);
            Rat.DragnDropSlow(PointsAndRectangles.xy1, PointsAndRectangles.xy2, 8);
            Rat.Clk(PointsAndRectangles.rarity);
            Thread.Sleep(1000);
            Rat.Clk(cls);//выбрать класс
            Thread.Sleep(500);
            Condition.ChooseTyres();
            Thread.Sleep(1000);
            do
            {
                Rat.Clk(PointsAndRectangles.accept);
                Thread.Sleep(500);
            } while (fc.FilterIsOpenned());//100% FilterCloser
            Thread.Sleep(2000);
        }
 public void ClearHand()
 {
     Point[] a = new Point[] { PointsAndRectangles.pHandSlot1,
                               PointsAndRectangles.pHandSlot2,
                               PointsAndRectangles.pHandSlot3,
                               PointsAndRectangles.pHandSlot4,
                               PointsAndRectangles.pHandSlot5 };
     for (int i = 0; i < 5; i++)
     {
         Point endPoint = new Point(a[i].X, a[i].Y - 270);
         Rat.DragnDropSlow(a[i], endPoint, 10);
     }
 }
        public int DragnDpopHand(int n, int uhl, int caCars)
        {
            //caCars - cond available cars
            //n -needed cars
            FastCheck  fc = new FastCheck();
            HandMaking hm = new HandMaking();

            Point[] a          = new Point[] { PointsAndRectangles.pHandSlot1, PointsAndRectangles.pHandSlot2, PointsAndRectangles.pHandSlot3, PointsAndRectangles.pHandSlot4, PointsAndRectangles.pHandSlot5 };
            Point[] b          = new Point[] { PointsAndRectangles.GarageSlot1, PointsAndRectangles.GarageSlot2, PointsAndRectangles.GarageSlot3, PointsAndRectangles.GarageSlot4, PointsAndRectangles.GarageSlot5, PointsAndRectangles.GarageSlot6, PointsAndRectangles.GarageSlot7, PointsAndRectangles.GarageSlot8 };
            int     drag       = 0; //сдвиги
            int     x          = 0; //слот гаража
            int     h          = 0; //слот руки, uhl использованные слоты в предыдущем подборе
            int     neededcars = n;

            while (n > 0)
            {
                if (x == caCars)
                {
                    break;
                } //x имеет значение и при нуле
                else
                {
                    if (x > 3 && drag == 0)
                    {
                        Rat.DragnDropSlow(PointsAndRectangles.ds1, PointsAndRectangles.de1, 5);
                        drag = 1;
                        Thread.Sleep(1000);
                    }//сдвиг

                    if (x > 5 && drag == 1)
                    {
                        Rat.DragnDropSlow(PointsAndRectangles.ds2, PointsAndRectangles.de2, 5);
                        drag = 2;
                        Thread.Sleep(1000);
                    }//сдвиг

                    if (x > 7)
                    {
                        break;
                    }//прерывание цикла в случае множества сломанных

                    if (hm.CarFixed(x))
                    {
                        NotePad.DoLog("Тачка " + (x + 1) + " исправна");
                        while (!fc.ItsGarage())
                        {
                            Thread.Sleep(2000);
                        }
                        Rat.DragnDropSlow(b[x], a[h + uhl], 8);
                        h++;
                        n--;
                    }
                    else
                    {
                        NotePad.DoLog("Тачка " + x + " не готова");
                    }
                    x++;
                }
            }

            int grayslots = fc.CheckHandSlot(uhl + 1, uhl + neededcars);

            NotePad.DoLog(grayslots + " слотов остались пустыми");
            return(grayslots);
        }