Example #1
0
        public void TestLottey()
        {
            Random rChooseNum = new Random();

            Thread.Sleep(20);
            int cNum = rChooseNum.Next(3, 12);

            int[] chooseNum = new int[cNum];
            int[] boonNum   = new int[5];

            chooseNum = RandomNumber.CreateChooseNumber(cNum);
            for (int i = 0; i < cNum; i++)
            {
                Console.Write(chooseNum[i] + " ");
            }
            Console.WriteLine();



            boonNum = RandomNumber.CreateBoonNumber();
            for (int i = 0; i < 5; i++)
            {
                Console.Write(boonNum[i] + " ");
            }
            Console.WriteLine();
            //判断是否中奖
            string mesBoon = ChooseFunction.Judge_Disorder_2to8(boonNum, chooseNum, 3);

            Console.WriteLine(mesBoon);
        }
Example #2
0
        public void TestDisorderX()
        {
            int[]  Boon    = new int[] { 1, 2, 3, 4, 5 };
            int[]  choose  = new int[] { 1, 2, 3, 6, 7, 8, 9 };
            string mesBoon = ChooseFunction.Judge_Disorder_2to8(Boon, choose, 3);

            Console.WriteLine(mesBoon);
        }