Exemplo n.º 1
0
 bool Validate(out string error)
 {
     error = "";
     if (!RedNumbers.Any())
     {
         error += "RedNumbers are incorrect!\n";
     }
     if (!BlackNumbers.Any())
     {
         error += "BlackNumbers are incorrect!\n";
     }
     if (Balance <= 0)
     {
         error += "Balance is incorrect!\n";
     }
     if (XNumberCoor.X <= 0 || XNumberCoor.Y <= 0)
     {
         error += "XNumberCoor is incorrect!\n";
     }
     if (YNumberCoor.X <= 0 || YNumberCoor.Y <= 0)
     {
         error += "YNumberCoor is incorrect!\n";
     }
     if (ActiveProcessName == "")
     {
         error += "ActiveProcessName is incorrect!\n";
     }
     return(error == "");
 }
Exemplo n.º 2
0
        void ReadRullateNumber()
        {
            int numberOfClick = 0;

            while (isRealNumberGetterWorking)
            {
                Thread.Sleep(100);
                var isRullateStopped = TryGetRullateNumber(out int number);
                if (isRullateStopped)
                {
                    if (RedNumbers.Contains(number))
                    {
                        Logger.Write("Сурх омад");
                        if (MyStavka == Color.Red)
                        {
                            Logger.Write("Ставкаи мухон Сурх буд");
                            Balance += 10 * numberOfClick;
                            Logger.Write($"Буридим баланс {Balance}");
                            numberOfClick = 1;
                            Stavka(Color.Red, numberOfClick);
                            // I won
                        }
                        else if (MyStavka == Color.Black)
                        {
                            Logger.Write("Ставкаи мухон Сиёх буд");
                            Balance -= numberOfClick * 10;
                            Logger.Write($"Бойдодим баланс {Balance}");
                            numberOfClick = numberOfClick * 2;
                            Stavka(Color.Red, numberOfClick);
                            // I lose
                        }
                        else
                        {
                            Logger.Write("Ставкая а сурх сар кун");
                            Stavka(Color.Red, 1);
                            numberOfClick = 1;
                        }
                    }
                    else if (BlackNumbers.Contains(number))
                    {
                        Logger.Write("Сиёх омад");
                        if (MyStavka == Color.Black)
                        {
                            Logger.Write("Ставка сиёх буд");
                            Balance += 10 * numberOfClick;
                            Logger.Write($"Буридим баланс {Balance}");
                            numberOfClick = 1;
                            Stavka(Color.Black, numberOfClick);
                            // I won
                        }
                        else if (MyStavka == Color.Red)
                        {
                            Logger.Write("Ставка сурх буд");
                            Balance -= numberOfClick * 10;
                            Logger.Write($"Бойдодим баланс {Balance}");
                            numberOfClick = numberOfClick * 2;
                            Stavka(Color.Black, numberOfClick);
                            // I lose
                        }
                        else
                        {
                            Stavka(Color.Black, 1);
                            numberOfClick = 1;
                        }
                    }
                    else
                    {
                        //0
                    }
                }
            }
        }