Initial commit
This commit is contained in:
40
pyground/sugar/symbol_tool.py
Normal file
40
pyground/sugar/symbol_tool.py
Normal file
@@ -0,0 +1,40 @@
|
||||
symbol_pay_table = """
|
||||
15+|3000|2000|1200|800|600|500|400
|
||||
14|1400|1200|800|400|300|240|200
|
||||
13|700|600|400|200|160|120|100
|
||||
12|300|250|200|100|70|60|50
|
||||
11|150|120|90|60|50|40|30
|
||||
10|100|80|60|40|30|25|20
|
||||
9|50|40|30|25|20|15|10
|
||||
8|40|30|25|20|15|10|8
|
||||
7|35|25|20|15|10|8|6
|
||||
6|30|20|15|10|8|6|5
|
||||
5|20|15|10|8|6|5|4
|
||||
"""
|
||||
|
||||
cascade = [line for line in symbol_pay_table.split("\n") if line.strip()]
|
||||
cascade = [[item for item in line.split("|") if item.strip() ] for line in cascade]
|
||||
|
||||
cols = len(cascade[0]) - 1
|
||||
|
||||
base_bet = 20
|
||||
mapping = {0:'A',1:'B', 2:'C', 3:'D', 4:'E', 5:'F', 6:'G'}
|
||||
result = {}
|
||||
for c in range(cols):
|
||||
result[mapping[c]] = {}
|
||||
for pay in cascade:
|
||||
if '+' in pay[0]:
|
||||
result[mapping[c]]['max_cascade'] = int(pay[0][0:-1])
|
||||
result[mapping[c]][pay[0]] = int(pay[c+1]) / 20
|
||||
# print(f"symbol{c} cas{pay[0]} pay:{pay[c+1]}")
|
||||
|
||||
import json
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
|
||||
|
||||
# 反计算回来校验
|
||||
# for symbol in result:
|
||||
# for key in result[symbol]:
|
||||
# if key != 'max_cascade':
|
||||
# print(f"{result[symbol][key] * base_bet}", end="\t")
|
||||
# print()
|
||||
Reference in New Issue
Block a user