Example #1
0
        public void Start()
        {
            displayNonRegister();
            string r_command = "";
            string l_command = "";

            while (!r_command.Equals("3"))
            {
                r_command = Console.ReadLine();
                switch (r_command)
                {
                case "1": Register();
                    break;

                case "2":
                    Login();
                    if (!isLogin)
                    {
                        displayNonRegister();
                        break;
                    }
                    while (l_command != "5")
                    {
                        l_command = Console.ReadLine();
                        switch (l_command)
                        {
                        case "1":
                            Deposit();
                            displayRegister();
                            break;

                        case "2":
                            Withdraw();
                            displayRegister();
                            break;

                        case "3":
                            Console.WriteLine("Coeficient => " + betService.GetOdds());
                            displayRegister();
                            break;

                        case "4":
                            Bet();
                            displayRegister();
                            break;

                        case "5":
                            Logout();
                            displayNonRegister();
                            break;

                        default:
                            Console.WriteLine("You entered wrong command, try 1, 2 or 3");
                            break;
                        }
                    }
                    break;

                case "3":
                    Exit();
                    break;

                default:
                    Console.WriteLine("You entered wrong command, try 1, 2 or 3");
                    break;
                }
            }
        }