订单逻辑修改

This commit is contained in:
hahwu 2025-01-18 19:05:49 +08:00
parent 1bebf0ddc2
commit 4b4bbdc080

View File

@ -56,8 +56,8 @@ func getChessDiff(ChessNum, OrderDiff, OrderN int) map[int]int {
switch OrderDiff { switch OrderDiff {
case diff_low: case diff_low:
rand := map[int]int{ rand := map[int]int{
diff_low: 99, diff_low: 99 - OrderN,
diff_mid: 1, diff_mid: 1 + OrderN,
} }
secondDiff := GoUtil.RandMap(rand) secondDiff := GoUtil.RandMap(rand)
rs = map[int]int{ rs = map[int]int{
@ -66,8 +66,8 @@ func getChessDiff(ChessNum, OrderDiff, OrderN int) map[int]int {
} }
case diff_mid: case diff_mid:
rand := map[int]int{ rand := map[int]int{
diff_low: 5, diff_low: 5 + OrderN,
diff_mid: 95, diff_mid: 95 - OrderN,
} }
secondDiff := GoUtil.RandMap(rand) secondDiff := GoUtil.RandMap(rand)
rs = map[int]int{ rs = map[int]int{
@ -90,37 +90,51 @@ func getChessDiff(ChessNum, OrderDiff, OrderN int) map[int]int {
switch OrderDiff { switch OrderDiff {
case diff_low: case diff_low:
rand := map[int]int{ rand := map[int]int{
diff_low: 99, diff_low: 95 - OrderN,
diff_mid: 1, diff_mid: 5 + OrderN,
} }
secondDiff := GoUtil.RandMap(rand) secondDiff := GoUtil.RandMap(rand)
rand = map[int]int{
diff_low: 60 - 4*OrderN,
diff_mid: 40 + 4*OrderN,
}
thirdDiff := GoUtil.RandMap(rand)
rs = map[int]int{ rs = map[int]int{
1: diff_low, 1: diff_low,
2: secondDiff, 2: secondDiff,
3: secondDiff, 3: thirdDiff,
} }
case diff_mid: case diff_mid:
rand := map[int]int{ rand := map[int]int{
diff_low: 5, diff_low: 50 - 3*OrderN,
diff_mid: 95, diff_mid: 50 + 3*OrderN,
} }
secondDiff := GoUtil.RandMap(rand) secondDiff := GoUtil.RandMap(rand)
rand = map[int]int{
diff_mid: 95 - 4*OrderN,
diff_high: 5 + 4*OrderN,
}
thirdDiff := GoUtil.RandMap(rand)
rs = map[int]int{ rs = map[int]int{
1: diff_low, 1: diff_low,
2: secondDiff, 2: secondDiff,
3: secondDiff, 3: thirdDiff,
} }
case diff_high: case diff_high:
rand := map[int]int{ rand := map[int]int{
diff_low: int(95 - 10*OrderN), diff_low: int(95 - 10*OrderN),
diff_mid: int(4 + 6*OrderN), diff_mid: int(5 + 10*OrderN),
diff_high: int(1 + 4*OrderN),
} }
secondDiff := GoUtil.RandMap(rand) secondDiff := GoUtil.RandMap(rand)
rand = map[int]int{
diff_mid: int(95 - 8*OrderN),
diff_high: int(5 + 8*OrderN),
}
thirdDiff := GoUtil.RandMap(rand)
rs = map[int]int{ rs = map[int]int{
1: diff_low, 1: diff_low,
2: secondDiff, 2: secondDiff,
3: secondDiff, 3: thirdDiff,
} }
} }
} }