Пример #1
0
 public void Bet()
 {
     if (dryRun)
     {
         Dry.Run(multiplier);
     }
     else
     {
         codeEvaler.Run();
     }
 }
Пример #2
0
        public bool Setup(string _cookie, int _multiplier, double _loss_margin, double _win_margin, double _percent_bet, BettingSystem _bettingSystem, double _stake, bool _slowMode, double _dryRunAmount)
        {
            dryRun = _dryRunAmount > 0;

            multiplier = _multiplier < min_multiplier ? min_multiplier : _multiplier;
            multiplier = _multiplier > max_multiplier ? max_multiplier : _multiplier;

            cookie = _cookie;

            if (dryRun)
            {
                Dry.SetAmount(_dryRunAmount);
                Dry.Run(_multiplier);
            }
            else
            {
                codeEvaler = new CodeEvaler();
                codeEvaler.Run();
            }

            loss_margin = _loss_margin;
            win_margin  = _win_margin;

            percent_bet   = _percent_bet;
            bettingSystem = _bettingSystem;
            slowMode      = _slowMode;

            if (_stake == 0)
            {
                usePercentBet = true;

                Console.WriteLine("You're using '{8}' strategy with a multiplier of {0}, starting at {1:F8} BTC, a loss margin of {2:P0} or {3:F8} BTC, a win margin of {4:P0} or {5:F8} BTC and a minimum bet of {6:P2} or {7:F8} BTC.",
                                  multiplier, start, loss_margin, loss_margin * start, win_margin, (1 + win_margin) * start, percent_bet, percent_bet * money < min_bet ? min_bet : percent_bet * money, Enum.GetName(bettingSystem.GetType(), bettingSystem));
            }
            else
            {
                usePercentBet = false;
                base_stake    = _stake;

                Console.WriteLine("You're using '{7}' strategy with a multiplier of {0}, starting at {1:F8} BTC, a loss margin of {2:P0} or {3:F8} BTC, a win margin of {4:P0} or {5:F8} BTC and a minimum bet of {6:F8} BTC.",
                                  multiplier, start, loss_margin, loss_margin * start, win_margin, (1 + win_margin) * start, base_stake, Enum.GetName(bettingSystem.GetType(), bettingSystem));
            }

            Console.Write("\nPress \"n\" to stop or any other key to continue: ");
            if (Console.ReadLine().ToLower() == "n")
            {
                Console.WriteLine(" Stopped game by user.\n");
                return(false);
            }

            Think();
            return(true);
        }