Пример #1
0
        public override int TotalBetCount(BasicModel.LotteryBasic.BetDetail item)
        {
            if (string.IsNullOrEmpty(item.BetContent))
            {
                return(0);
            }
            //注数
            string postionStr = "";
            string content    = SplitRenXuanContent(item.BetContent, ref postionStr);

            int notes = 0;

            if (content.Length < 2 || postionStr.Length < 2)
            {
                return(0);
            }

            int contentLen       = content.Split(',').Length;
            Combinations <int> v = new Combinations <int>(postionStr.Select(c => Convert.ToInt32(c.ToString())).ToList(), 2);

            foreach (var c in v._combinations)
            {
                notes += CombinationHelper.Cmn(contentLen, 2);
            }
            return(notes);
        }
Пример #2
0
        public override int TotalBetCount(BasicModel.LotteryBasic.BetDetail item)
        {
            string postionStr = "";
            string content    = SplitRenXuanContent(item.BetContent, ref postionStr);

            var array = content.Split(',');

            if (array.Length != 2 || array[1].Length < 2 || postionStr.Length < 4)
            {
                return(0);
            }

            int count = 0;

            foreach (var dan in array[0])
            {
                var fcount = array[1].Where(a => a != dan).ToArray().Length;
                if (fcount < 2)
                {
                    continue;
                }
                count += CombinationHelper.Cmn(fcount, 2);
            }

            Combinations <int> v = new Combinations <int>(postionStr.Select(c => Convert.ToInt32(c.ToString())).ToList(), 4);
            int notes            = 0;

            foreach (var b in v._combinations)
            {
                notes += count;
            }

            return(notes);
        }
Пример #3
0
        public override int TotalBetCount(BasicModel.LotteryBasic.BetDetail item)
        {
            string postionStr = "";
            string content    = SplitRenXuanContent(item.BetContent, ref postionStr);

            if (!string.IsNullOrEmpty(content) && postionStr.Length >= 4)
            {
                int count            = CombinationHelper.Cmn(content.Replace(",", "").Length, 4);
                Combinations <int> v = new Combinations <int>(postionStr.Select(c => Convert.ToInt32(c.ToString())).ToList(), 4);

                int notes = 0;
                foreach (var b in v._combinations)
                {
                    notes += count;
                }

                return(notes);
            }
            return(0);
        }
 public override int TotalBetCount(BasicModel.LotteryBasic.BetDetail item)
 {
     return(CombinationHelper.Cmn(item.BetContent.Replace(",", "").Length, 2));
 }