Пример #1
0
        public void DalamberBotTest()
        {
            DalamberBot DalamberTest = new DalamberBot();

            BetInfo.Balance = 5000;
            DalamberTest.Action(400, 2);
        }
Пример #2
0
        public void MainMenu()
        {
            for (; ;)
            {
                if (exit)
                {
                    break;
                }
                Console.WriteLine("1 - " + "Start");
                Console.WriteLine("2 - " + "Exit");
                choice = Convert.ToInt32(Console.ReadLine());


                if (choice == 1)
                {
                    Console.Clear();
                    Console.WriteLine("1 - " + "Play by yourself");
                    Console.WriteLine("2 - " + "Bots");
                    Console.WriteLine("3 - " + "Exit");
                    choice = Convert.ToInt32(Console.ReadLine());
                    if (choice == 1)
                    {
                        Console.Clear();
                        while (balance <= 0)
                        {
                            Console.Clear();
                            Console.WriteLine("Inter you Balance (more than 0)");
                            balance = Convert.ToInt32(Console.ReadLine());
                        }

                        BetInfo.Balance = balance;


                        Console.Clear();
                        BettingMenu();
                    }

                    else if (choice == 2)
                    {
                        //Console.Clear();
                        bool right = false;
                        while (!right)
                        {
                            Console.Clear();
                            Console.WriteLine("What bot do you wanna play?\n 1 - Dalamber \n 2 - Martingale ");
                            BotChoice = Convert.ToInt32(Console.ReadLine());
                            Console.WriteLine("Enter bot Balance, minimum bid and amount of bets");
                            balance   = Convert.ToInt32(Console.ReadLine());
                            MinBid    = Convert.ToInt32(Console.ReadLine());
                            BetAmount = Convert.ToInt32(Console.ReadLine());
                            if ((BotChoice == 1 || BotChoice == 2) && balance > 0 && MinBid > 0 && BetAmount > 0)
                            {
                                right = true;
                            }
                        }
                        BetInfo.Balance = balance;
                        if (BotChoice == 1)
                        {
                            Dalamber.Action(BetAmount, MinBid);
                        }
                        else
                        {
                            Martingale.Action(BetAmount, MinBid);
                        }
                    }

                    else if (choice == 3)
                    {
                        Console.Clear();
                        break;
                    }
                    else
                    {
                        Console.Clear();
                    }
                }
                else if (choice == 2)
                {
                    Console.Clear();
                    break;
                }
                else
                {
                    Console.Clear();
                }
            }
        }