Example #1
0
        /// <summary>
        /// 双色球复式算奖
        /// </summary>
        /// <param name="code">所选号码</param>
        /// <param name="drawedNumber">开奖号码</param>
        /// <returns>奖级</returns>
        protected int CompoundSsq(string code, string drawedNumber)
        {
            int level = 0;

            string[]      ArrDrawedNumber   = drawedNumber.Split('*');
            List <string> ReddrawedNumber   = ArrDrawedNumber[0].Split(',').ToList();
            List <string> BluedreawedNumber = ArrDrawedNumber[1].Split(',').ToList();

            string[]      ComNumber   = code.Split('*');
            List <string> RedNumbers  = ComNumber[0].Split(',').ToList();
            List <string> BlueNumbers = ComNumber[1].Split(',').ToList();
            List <string> RedNumber   = BbMath.GetPortfolio(RedNumbers, 6);
            List <string> BlueNumber  = BbMath.GetPortfolio(BlueNumbers, 1);

            /* 拆分复式为单式,红蓝球用“|”分割 */
            var array = BbMath.GetArrayList(RedNumber, BlueNumber, "|");

            for (int j = 0; j < array.Count(); j++)
            {
                string[]      newcode          = array[j].Split('|');
                List <string> RedchosedNumber  = newcode[0].Split(',').ToList();
                List <string> BluechosedNumber = newcode[1].Split(',').ToList();
                level = this.SsqSingle(RedchosedNumber, BluechosedNumber, ReddrawedNumber, BluedreawedNumber);
                if (level > 0)
                {
                    break;
                }
            }
            return(level);
        }
Example #2
0
        /// <summary>
        /// 大乐透复式算奖
        /// </summary>
        /// <param name="code">所选号码</param>
        /// <param name="drawedNumber">开奖号码</param>
        /// <param name="investType">是否追加</param>
        /// <param name="level">奖级</param>
        /// <returns>中奖金额</returns>
        protected int CompoundDlt(string code, string drawedNumber)
        {
            int level = 0;

            string[]      ArrDrawedNumber   = drawedNumber.Split('*');
            List <string> FrondrawedNumber  = ArrDrawedNumber[0].Split(',').ToList();
            List <string> BackdreawedNumber = ArrDrawedNumber[1].Split(',').ToList();

            string[]      ComNumber    = code.Split('*');
            List <string> FrontNumbers = ComNumber[0].Split(',').ToList();
            List <string> BackNumbers  = ComNumber[1].Split(',').ToList();
            List <string> FrontNumber  = BbMath.GetPortfolio(FrontNumbers, 5);
            List <string> BackNumber   = BbMath.GetPortfolio(BackNumbers, 2);

            /* 拆分复式为单式,前后区用“|”分割 */
            var array = BbMath.GetArrayList(FrontNumber, BackNumber, "|");

            for (int j = 0; j < array.Count(); j++)
            {
                string[]      newcode          = array[j].Split('|');
                List <string> FronchosedNumber = newcode[0].Split(',').ToList();
                List <string> BackchosedNumber = newcode[1].Split(',').ToList();
                level = this.DltSingle(FronchosedNumber, BackchosedNumber, FrondrawedNumber, BackdreawedNumber);
                if (level > 0)
                {
                    break;
                }
            }
            return(level);
        }
Example #3
0
        /// <summary>
        /// 双色球胆拖算奖
        /// </summary>
        /// <param name="code">所选号码</param>
        /// <param name="drawedNumber">开奖号码</param>
        /// <returns></returns>
        protected int BraveryTowSsq(string code, string drawedNumber)
        {
            int level = 0;

            string[]      ArrDrawedNumber   = drawedNumber.Split('*');
            List <string> ReddrawedNumber   = ArrDrawedNumber[0].Split(',').ToList();
            List <string> BluedreawedNumber = ArrDrawedNumber[1].Split(',').ToList();
            List <string> array             = new List <string>();

            string[]      TowNumber         = code.Split('*');
            string[]      RedBraveryTow     = TowNumber[0].Split('@');
            string[]      RedBraveryNumbers = RedBraveryTow[0].Split(',');          //前区胆码
            List <string> RedTowBumbers     = RedBraveryTow[1].Split(',').ToList(); //前区拖码

            List <string> RedBraveryList = new List <string> {
                RedBraveryTow[0]
            };                                                                                                      //将前区胆码转为泛型

            List <string> RedTowNumber         = BbMath.GetPortfolio(RedTowBumbers, 6 - RedBraveryNumbers.Count()); //将拖码组合
            List <string> RedNumberCombination = BbMath.GetArrayList(RedBraveryList, RedTowNumber, ",");            //得到胆码拖码所有组合

            string[] BlueBraveryTow = TowNumber[1].Split(',');

            array = BbMath.GetArrayList(RedNumberCombination, BlueBraveryTow.ToList(), "|");

            for (Int32 j = 0; j < array.Count(); j++)
            {
                string[]      newcode          = array[j].Split('|');
                List <string> FronchosedNumber = newcode[0].Split(',').ToList();
                List <string> BackchosedNumber = newcode[1].Split(',').ToList();
                level = this.SsqSingle(FronchosedNumber, BackchosedNumber, ReddrawedNumber, BluedreawedNumber);
                if (level > 0)
                {
                    break;
                }
            }
            return(level);
        }
Example #4
0
        /// <summary>
        /// 大乐透胆拖算奖
        /// </summary>
        /// <param name="code">所选号码</param>
        /// <param name="drawedNumber">开奖号码</param>
        /// <returns></returns>
        protected int BraveryTowDlt(string code, string drawedNumber)
        {
            int level = 0;

            string[]      ArrDrawedNumber   = drawedNumber.Split('*');
            List <string> FrondrawedNumber  = ArrDrawedNumber[0].Split(',').ToList();
            List <string> BackdreawedNumber = ArrDrawedNumber[1].Split(',').ToList();
            List <string> array             = new List <string>();

            string[]      TowNumber              = code.Split('*');
            string[]      FrontBraveryTow        = TowNumber[0].Split('@');
            List <string> FrontNumberCombination = new List <string>();

            if (FrontBraveryTow.Length == 1)
            {
                List <string> FrontBraveryList = FrontBraveryTow[0].Split(',').ToList(); //将前区胆码转为list
                FrontNumberCombination = BbMath.GetPortfolio(FrontBraveryList, 5);       //得到胆码拖码所有组合
            }
            else if (FrontBraveryTow.Length == 2)
            {
                string[]      FrontBraveryNumbers = FrontBraveryTow[0].Split(',');          //前区胆码
                List <string> FrontTowBumbers     = FrontBraveryTow[1].Split(',').ToList(); //前区拖码

                List <string> FrontBraveryList = new List <string> {
                    FrontBraveryTow[0]
                };                                                                                                    //将前区胆码转为泛型

                List <string> FrontTowNumber = BbMath.GetPortfolio(FrontTowBumbers, 5 - FrontBraveryNumbers.Count()); //将拖码组合
                FrontNumberCombination = BbMath.GetArrayList(FrontBraveryList, FrontTowNumber, ",");                  //得到胆码拖码所有组合
            }
            string[] BackBraveryTow = TowNumber[1].Split('@');

            if (BackBraveryTow.Length == 1)
            {
                //后区无胆码
                List <string> BackBraveryTows = BackBraveryTow[0].Split(',').ToList();
                List <string> BackTowNumbers  = BbMath.GetPortfolio(BackBraveryTows, 2);
                array = BbMath.GetArrayList(FrontNumberCombination, BackTowNumbers, "|");
            }
            else
            {
                //后区有胆码
                List <string> BackBraveryNumber = BackBraveryTow[0].Split(',').ToList();
                List <string> BackBraveryList   = new List <string> {
                    BackBraveryTow[0]
                };
                List <string> BackTowNumber         = BbMath.GetPortfolio(BackBraveryTow[1].Split(',').ToList(), 1);
                List <string> BackNumberCombination = BbMath.GetArrayList(BackBraveryList, BackTowNumber, ",");
                array = BbMath.GetArrayList(FrontNumberCombination, BackNumberCombination, "|");
            }
            for (Int32 j = 0; j < array.Count(); j++)
            {
                string[]      newcode          = array[j].Split('|');
                List <string> FronchosedNumber = newcode[0].Split(',').ToList();
                List <string> BackchosedNumber = newcode[1].Split(',').ToList();
                level = this.DltSingle(FronchosedNumber, BackchosedNumber, FrondrawedNumber, BackdreawedNumber);
                if (level > 0)
                {
                    break;
                }
            }
            return(level);
        }