|
@@ -1,8 +1,8 @@
|
1
|
1
|
// 模拟比赛得分
|
2
|
2
|
const matches = [
|
3
|
|
- [1, 0], [2, 0], [2, 1], [3, 0], [3, 1], [3, 2], [4, 0], [4, 1], [4, 2], [5, 0], [5, 1], [5, 2], [99, 0],
|
4
|
|
- [0, 0], [1, 1], [2, 2], [3, 3], [99, 99],
|
5
|
|
- [0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [2, 3], [0, 4], [1, 4], [2, 4], [0, 5], [1, 5], [2, 5], [0, 99]
|
|
3
|
+ [50, 46], [60, 52], [75, 62], [88, 71], [95, 72], [107, 80],
|
|
4
|
+ [46, 50], [52, 60], [62, 75], [71, 88], [72, 95], [80, 107],
|
|
5
|
+ [40, 40], [60, 55], [96, 80], [120, 110], [150, 106],
|
6
|
6
|
]
|
7
|
7
|
|
8
|
8
|
const playWayFunc = {
|
|
@@ -13,9 +13,7 @@ const playWayFunc = {
|
13
|
13
|
}
|
14
|
14
|
|
15
|
15
|
// 遍历模拟比赛获取最大, 最小奖金
|
16
|
|
-// rq 让球数
|
17
|
|
-// ys 预设总分
|
18
|
|
-export function GetPrice (allParts, rq, ys) {
|
|
16
|
+export function GetPrice (allParts) {
|
19
|
17
|
let minPrice
|
20
|
18
|
let maxPrice
|
21
|
19
|
|
|
@@ -44,9 +42,10 @@ function GetMinAndMax (allParts, match, rq, ys) {
|
44
|
42
|
const price = parts.map(part => {
|
45
|
43
|
// 场次组合 比如 2串1
|
46
|
44
|
return part.map(grp => {
|
47
|
|
- const { wayCode } = grp.detail
|
|
45
|
+ const { detail, spreadPoints, presetPoints } = grp
|
|
46
|
+ const { wayCode } = detail
|
48
|
47
|
const fn = playWayFunc[wayCode]
|
49
|
|
- return fn(grp, match, rq, ys)
|
|
48
|
+ return fn(grp, match, spreadPoints, presetPoints)
|
50
|
49
|
}).filter(Boolean).reduce((acc, x) => acc * x, 1)
|
51
|
50
|
}).reduce((acc, x) => acc + x, 0)
|
52
|
51
|
|