最近互联网彩票被国家叫停进行整改了,整改后互联网公司获取利润肯定会降低,但是不得不说中国的互联网彩票销售需要进行整改了,虽然对行业是阵痛,但是能够更好的规范彩票市场,对整个市场都会起到积极的作用。前段时间在做互联网彩票时也遇到了一些问题,特别是足彩任选九的复试组合算法。
足彩标注投注玩法:从14场比赛中任意选择9场比赛,每场比赛选择1种比赛结果为1注,每场比赛最多可选3种结果,单注最高奖金500万元!标准投注时可选择1~8场比赛结果作为胆码,其它比赛场次结果作为拖码进行胆拖投注,单注最高奖金500万元!
足彩标准投注是只从14场比赛中选9场比赛,而我们提交给第三方接口的必须是标准投注方式,也就是每次提交投注都是只能选择九场进行提交,但是在大部分的互联网彩票投注站都允许超过9场比赛的一个投注方式,这里就是各个互联网投注终端自己做的一个循环提交的处理了,所以这个需要一个自己组合算法,下面是该算法的代码,用C#代码实现:
这是足彩类型


1 public class FootBallItem : PropertyChangedBase 2 { 3 #region Property 4 private string lotteryId; 5 /// <summary> 6 /// 彩种编号 7 /// </summary> 8 public string LotteryId 9 { 10 get { return lotteryId; } 11 set { lotteryId = value; } 12 } 13 14 private string endTime; 15 /// <summary> 16 /// 结束时间 17 /// </summary> 18 public string EndTime 19 { 20 get { return endTime; } 21 set { endTime = value; } 22 } 23 private string finalScore; 24 25 public string FinalScore 26 { 27 get { return finalScore; } 28 set { finalScore = value; } 29 } 30 31 private string guestName; 32 /// <summary> 33 /// 客场 34 /// </summary> 35 public string GuestName 36 { 37 get { return guestName; } 38 set { guestName = value; } 39 } 40 private string index; 41 /// <summary> 42 /// 序列 43 /// </summary> 44 public string Index 45 { 46 get { return index; } 47 set { index = value; } 48 } 49 50 private string leageName; 51 /// <summary> 52 /// 赛事 53 /// </summary> 54 public string LeageName 55 { 56 get { return leageName; } 57 set { leageName = value; } 58 } 59 60 private string masterName; 61 /// <summary> 62 /// 主场 63 /// </summary> 64 public string MasterName 65 { 66 get { return masterName; } 67 set { masterName = value; } 68 } 69 private string result; 70 71 public string Result 72 { 73 get { return result; } 74 set { result = value; } 75 } 76 private string resultDes; 77 78 public string ResultDes 79 { 80 get { return resultDes; } 81 set { resultDes = value; } 82 } 83 private string scoreAtHalf; 84 85 public string ScoreAtHalf 86 { 87 get { return scoreAtHalf; } 88 set { scoreAtHalf = value; } 89 } 90 private string secondHalfTheScore; 91 92 public string SecondHalfTheScore 93 { 94 get { return secondHalfTheScore; } 95 set { secondHalfTheScore = value; } 96 } 97 98 private string startTime; 99 /// <summary> 100 /// 开赛时间 101 /// </summary> 102 public string StartTime 103 { 104 get { return startTime; } 105 set { startTime = value; } 106 } 107 108 private bool _scoreThree; 109 /// <summary> 110 /// 全场赢或者客场进3个球及以上 111 /// </summary> 112 public bool ScoreThree 113 { 114 get { return _scoreThree; } 115 set 116 { 117 string strNum = LotteryId.Equals("302") ? "3+" : "3"; 118 if (value) 119 { 120 StrFootBallNumber += strNum; 121 nSelectedCount++; 122 } 123 else 124 { 125 nSelectedCount--; 126 if (StrFootBallNumber.Contains(strNum)) 127 { 128 StrFootBallNumber = StrFootBallNumber.Replace(strNum, null); 129 } 130 } 131 _scoreThree = value; 132 NotifyOfPropertyChange("ScoreThree"