Пример #1
0
        static void Main(string[] args)
        {
            string wish      = "";
            string lab_score = "";

            Console.WriteLine("please Click any key to start the game");
            Console.ReadKey();
            while (true)
            {
                string message = "";
                Console.Clear();
                initial();
                bool result = game.firstCicle(out message);


                if (result)
                {
                    score_wj  = score_wj + game.score;
                    lab_score = score_wj.ToString();
                    if (restart())
                    {
                        Console.WriteLine("No gamble, come again (Y/N)");
                        wish = Console.ReadLine();
                        if (wish.ToLower() == "y")
                        {
                            initial(); score_wj = 200; lab_score = score_wj.ToString();
                        }
                        else
                        {
                            Environment.Exit(0);
                        }
                    }
                    else
                    {
                        initial();
                    }
                }

                if (score_wj <= 0)
                {
                    Console.WriteLine("No gamble, come again (Y/N)");
                    wish = Console.ReadLine();
                    if (wish.ToLower() == "y")
                    {
                        initial(); score_wj = 200; lab_score = score_wj.ToString();
                    }
                    else
                    {
                        Environment.Exit(0);
                    }
                }
                Console.WriteLine("Please choose the amount of the bet ( 1:10,2:20....20:200).");
                wish   = Console.ReadLine();
                game.k = wish;

                if (!xianshi())
                {
                    continue;
                }

                Console.ReadKey();
            }
            Console.WriteLine("Enter anything to comtinue or enter No to stop! ");
        }