鱼C论坛

 找回密码
 立即注册
查看: 3706|回复: 2

[作品展示] 原神-祈愿模拟系统

[复制链接]
发表于 2022-2-22 11:48:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 v欣 于 2022-2-23 08:52 编辑

我原神抽奖太非了,写来写代码骗骗自己

本人小白,还没过计算机二级


文件解压后将两个 xlsx 文件放在 py 文件的工作目录下即可!

在window的cmd中怎么实现输出彩色字体, 让指教


  1. import random
  2. import openpyxl
  3. from openpyxl.styles import Font, PatternFill
  4. import datetime
  5. import os


  6. WD = os.getcwd()
  7. ''' WD = '/home/vxin/桌面/python/games/yuanshen' '''
  8. os.chdir(WD)

  9. ResidentAwardPoolPath = './奖池.xlsx'
  10. WinningProbabilityPath = './星级及概率.xlsx'
  11. LotteryRecordPath = './记录.xlsx'

  12. TitleBlockFont = Font(bold=True)
  13. FiveStarFont = Font(bold=True, color='00FFFF00')
  14. FourStarFont = Font(bold=True, color='00FF00FF')
  15. AllFill = PatternFill(fill_type='solid', fgColor='00C0C0C0')


  16. def outprint(star, type, name):
  17.     """打印本次抽中的奖品

  18.     Args:
  19.         star (int): 星级
  20.         type (str): 类型
  21.         name (str): 名称
  22.     """
  23.     if star == 5:
  24.         color = 33
  25.     elif star == 4:
  26.         color = 35
  27.     elif star == 3:
  28.         color = 34
  29.     else:
  30.         color = 31
  31.     #  print('\033[0;{};40m星级:{} 种类:{} 名称:{}\033[0m'.format(color, star, type, name))
  32.     print('星级:{} 种类:{} 名称:{}'.format(star, type, name))

  33. def query(project):
  34.     """打印该抽奖项目的抽奖记录

  35.     Args:
  36.         project (str): 抽奖项目(常驻祈愿、角色活动祈愿、武器活动祈愿)
  37.     """   
  38.     if os.path.exists(LotteryRecordPath):
  39.         wb = openpyxl.load_workbook(LotteryRecordPath)
  40.         ws = wb[project]
  41.         for i in range(1, len([v for v in ws.values])):
  42.             if ws['D%d'%(i+1)].value == 5:
  43.                 color = 33
  44.             elif ws['D%d'%(i+1)].value == 4:
  45.                 color = 35
  46.             elif ws['D%d'%(i+1)].value == 3:
  47.                 color = 34
  48.             else:
  49.                 color = 31
  50.             print('\033[0;{};40m第{}次,抽到{}星{},名称:{}\033[0m'.format(
  51.                   color, ws['E%d'%(i+1)].value, ws['D%d'%(i+1)].value,
  52.                          ws['C%d'%(i+1)].value, ws['B%d'%(i+1)].value))
  53.     else:
  54.         print('未找到 %s 文件!'%(LotteryRecordPath))

  55. def get_frequency(project):
  56.     """查询抽各星级对应的概率(%)、保底次数、为本期物品概率(%)。加载当前工作目录下的文件 星级及概率.xlsx

  57.     Args:
  58.         project (str): 抽奖项目(常驻祈愿、角色活动祈愿、武器活动祈愿)

  59.     Returns:
  60.         dict: {星级:list(概率(%), 保底, 为本期物品概率(%))}
  61.     """   
  62.     wb = openpyxl.load_workbook(WinningProbabilityPath)
  63.     ws = wb[project]
  64.     d = {}
  65.     for y in (2, 3, 4):
  66.         for x in ('A', 'B', 'C', 'D'):
  67.             if x == 'A':
  68.                 star = ws['%s%d'%(x, y)].value
  69.             elif x == 'B':
  70.                 frequency = ws['%s%d'%(x, y)].value
  71.             elif x == 'C':
  72.                 minimum_times = ws['%s%d'%(x, y)].value
  73.             else:
  74.                 ipota = ws['%s%d'%(x, y)].value  # Item probability of this activity
  75.         d.update({star:[frequency, minimum_times, ipota]})
  76.     return d

  77. def get_jackpot(project):
  78.     """导入奖池内容。加载当前工作目录下的文件 奖池.xlsx

  79.     Args:
  80.         project (str): 抽奖项目(常驻祈愿、角色活动祈愿、武器活动祈愿)

  81.     Returns:
  82.         tuple: 三个列表[星级, 类型, 名称]
  83.     """   
  84.     wb = openpyxl.load_workbook(ResidentAwardPoolPath)
  85.     ws = wb[project]
  86.     five_star = []
  87.     four_stat = []
  88.     three_star = []
  89.     t = 0
  90.     for row in ws.values:
  91.         t += 1
  92.         if t == 1:
  93.             pass
  94.         else:
  95.             tl = tuple(row)
  96.             if tl[0] == 5:
  97.                 five_star.append(tl)
  98.             elif tl[0] == 4:
  99.                 four_stat.append(tl)
  100.             else:
  101.                 three_star.append(tl)
  102.     return (five_star, four_stat, three_star)

  103. def keep_records(project, star, type, name, remakes):
  104.     """保存抽奖记录。保存文当前工作目录下的 记录.xlsx

  105.     Args:
  106.         project (str): 抽奖项目(常驻祈愿、角色活动祈愿、武器活动祈愿)
  107.         star (int): 星级
  108.         type (str): 类型
  109.         name (str): 名称
  110.         remakes (str)): 限定角色标记奖池备注
  111.     """   
  112.     if os.path.exists(LotteryRecordPath):
  113.         wb = openpyxl.load_workbook(LotteryRecordPath)
  114.         ws = wb[project]
  115.         p = len([v for v in ws.values])  # p为列表的行数
  116.         ws['A%d'%(p+1)] = datetime.datetime.today()  # A列为时间
  117.         ws['A%d'%(p+1)].number_format = "yyyy-mm-dd hh:mm:ss"
  118.         ws['B%d'%(p+1)] = name  # B列为名称
  119.         ws['C%d'%(p+1)] = type  # C列为种类
  120.         ws['D%d'%(p+1)] = int(star)  # D列为星级
  121.         if p == 1:
  122.             ws['E%d'%(p+1)] = 1  # E列为总次数
  123.             ws['F%d'%(p+1)] = 1  # F列为距离上次5星的次数
  124.             ws['G%d'%(p+1)] = 1  # G列为距离上次4星的次数
  125.         else:
  126.             ws['E%d'%(p+1)] = ws['E%d'%(p)].value + 1
  127.             if ws['D%d'%(p)].value == 5:
  128.                 ws['F%d'%(p+1)] = 1
  129.                 ws['G%d'%(p+1)] = 1
  130.             elif ws['D%d'%(p)].value == 4:
  131.                 ws['F%d'%(p+1)] = ws['F%d'%(p)].value + 1
  132.                 ws['G%d'%(p+1)] = 1
  133.             else:
  134.                 ws['F%d'%(p+1)] = ws['F%d'%(p)].value + 1
  135.                 ws['G%d'%(p+1)] = ws['G%d'%(p)].value + 1
  136.         ws['H%d'%(p+1)] = remakes  # H列为备注
  137.         for i in range(ord('A'), ord('I')):
  138.             ws['%s%d'%(chr(i), p+1)].fill = AllFill
  139.             if star == 5:
  140.                 ws['%s%d'%(chr(i), p+1)].font = FiveStarFont
  141.             elif star == 4:
  142.                 ws['%s%d'%(chr(i), p+1)].font = FourStarFont
  143.             else:
  144.                 pass
  145.         wb.save(LotteryRecordPath)
  146.     else:
  147.         wb = openpyxl.Workbook()
  148.         ws1 = wb.create_sheet("常驻祈愿")
  149.         ws2 = wb.create_sheet("角色活动祈愿")
  150.         ws3 = wb.create_sheet("武器活动祈愿")
  151.         del wb['Sheet']
  152.         for i in (1, 2, 3):
  153.             exec('ws%d.column_dimensions["A"].width = 20'%(i))
  154.             exec('ws%d.column_dimensions["B"].width = 15'%(i))
  155.             exec('ws%d.column_dimensions["F"].width = 18'%(i))
  156.             exec('ws%d.column_dimensions["G"].width = 18'%(i))
  157.             exec('ws%d["A1"] = "时间"'%(i))
  158.             exec('ws%d["B1"] = "名称"'%(i))
  159.             exec('ws%d["C1"] = "类别"'%(i))
  160.             exec('ws%d["D1"] = "星级"'%(i))
  161.             exec('ws%d["E1"] = "总次数"'%(i))
  162.             exec('ws%d["F1"] = "距离上次5星的次数"'%(i))
  163.             exec('ws%d["G1"] = "距离上次4星的次数"'%(i))
  164.             exec('ws%d["H1"] = "备注"'%(i))
  165.             for j in range(ord('A'), ord('I')):
  166.                 exec('ws%d["%s1"].font = TitleBlockFont'%(i, chr(j)))
  167.                 exec('ws%d["%s1"].fill = AllFill'%(i, chr(j)))
  168.             exec('ws%d.freeze_panes = "A2"'%(i))
  169.         wb.save(LotteryRecordPath)
  170.         keep_records(project, star, type, name, remakes)

  171. def minimum_mark(project, x=0):
  172.     """返回5星及4星的保底标志

  173.     Args:
  174.         project (str): 抽奖项目(常驻祈愿、角色活动祈愿、武器活动祈愿)
  175.         x (int): 5星保底次数

  176.     Returns:
  177.         tuple: 5星的标记, 4星的标记[, 上次5星角色名称, 上次4星角色名称]
  178.     """   
  179.     if os.path.exists(LotteryRecordPath):
  180.         wb = openpyxl.load_workbook(LotteryRecordPath)
  181.         ws = wb[project]
  182.         p = len([v for v in ws.values])
  183.         five = ws['F%d'%(p)].value
  184.         four = ws['G%d'%(p)].value
  185.         if project == '常驻祈愿':
  186.             return (five, four)
  187.         else:
  188.             def last(x):
  189.                 lfive = ['N']
  190.                 lfour = ['N']
  191.                 if p <= x:
  192.                     for row in ws.values:
  193.                         l = list(row)
  194.                         if l[3] == 5:
  195.                             lfive.append(l[1])
  196.                         elif l[3] == 4:
  197.                             lfour.append(l[1])
  198.                 else:
  199.                     for row in list(ws.values)[p-90:]:
  200.                         l = list(row)
  201.                         if l[3] == 5:
  202.                             lfive.append(l[1])
  203.                         elif l[3] == 4:
  204.                             lfour.append(l[1])
  205.                 return (lfive[-1], lfour[-1])
  206.             if project == '角色活动祈愿':
  207.                 (last_five, last_four) = last(x)
  208.                 return (five, four, last_five, last_four)
  209.             elif project == '武器活动祈愿':
  210.                 wb1 = openpyxl.load_workbook(ResidentAwardPoolPath)
  211.                 ws1 = wb['武器活动祈愿']
  212.                 m = ws1['G1'].value
  213.                 (last_five, last_four) = last(x)
  214.                 return (five, four, last_five, last_four, m)
  215.     else:
  216.         if project == '常驻祈愿':
  217.             return (0, 0)
  218.         elif project == '角色活动祈愿':
  219.             return (0, 0, 0, 0)
  220.         elif project == '武器活动祈愿':
  221.             wb1 = openpyxl.load_workbook(ResidentAwardPoolPath)
  222.             ws1 = wb1['武器活动祈愿']
  223.             m = ws1['G1'].value
  224.             return (0, 0, 0, 0, m)
  225.         else:
  226.             pass

  227. def get_jackpot2(project, remakes):
  228.     (five_star1, four_star1, three_star1) = get_jackpot('常驻祈愿')
  229.     if project == '常驻祈愿':
  230.         return (five_star1, four_star1, three_star1)
  231.     else:
  232.         if project == '角色活动祈愿':
  233.             for f in get_jackpot(project)[0]:
  234.                 if f[2] == remakes[:-1]:
  235.                     five_star2 = [f]
  236.             four_star2 = get_jackpot(project)[1]
  237.             for a in five_star1:
  238.                 if a[0] == 5 and a[1] == '武器':
  239.                     five_star1.remove(a)
  240.             for a in four_star2:
  241.                 if a in four_star1:
  242.                     four_star1.remove(a)
  243.         elif project == '武器活动祈愿':
  244.             five_star2 = []
  245.             for f in get_jackpot(project)[0]:
  246.                 five_star2.append(f)
  247.             four_star2 = get_jackpot(project)[1]
  248.             for a in five_star1:
  249.                 if a[0] == 5 and a[1] == '角色':
  250.                     five_star1.remove(a)
  251.             for a in four_star2:
  252.                 if a in four_star1:
  253.                     four_star1.remove(a)
  254.         return (five_star1, four_star1, three_star1, five_star2, four_star2)

  255. def ger_frequency2(project):
  256.     d = get_frequency(project)  # star:[frequency, minimum_times, ipota]
  257.     three_frequency = int(d[3][0]*10)
  258.     (five_frequency, five_minimun_times) = (int(d[5][0]*10), int(d[5][1]))
  259.     (four_frequnecy, four_minimun_times) = (int(d[4][0]*10), int(d[4][1]))
  260.     if project == '常驻祈愿':
  261.         return (five_frequency, five_minimun_times, four_frequnecy, four_minimun_times, three_frequency)
  262.     else:
  263.         (five_frequency, five_minimun_times, five_ipota) = (int(d[5][0]*10), int(d[5][1]), int(d[5][2]*10))
  264.         (four_frequnecy, four_minimun_times, four_ipota) = (int(d[4][0]*10), int(d[4][1]), int(d[5][2]*10))
  265.         return (five_frequency, five_minimun_times, five_ipota, four_frequnecy, four_minimun_times, four_ipota, three_frequency, d[5][2])

  266. def luck_draw(project, jackpot2, frequency2):
  267.     """抽奖模块

  268.     Args:
  269.         project (str): 抽奖项目(常驻祈愿、角色活动祈愿、武器活动祈愿)
  270.         jackpot2 (tupe): get_jackpot2的返回值
  271.         frequency2 (tupe): get_frequency2的返回值

  272.     Returns:
  273.         list: 星级, 类别, 名称
  274.     """   
  275.     if project == '常驻祈愿':
  276.         (five_star1, four_star1, three_star1) = jackpot2
  277.         (five_mark, four_mark) = minimum_mark(project)
  278.         (five_frequency, five_minimun_times, four_frequnecy, four_minimun_times, three_frequency) = frequency2
  279.         if five_mark == five_minimun_times - 1:  # 五星保底
  280.             return random.choice(five_star1)
  281.         else:
  282.             if four_mark == four_minimun_times - 1:  # 四星保底
  283.                 return random.choice(four_star1)
  284.             else:  # 常规
  285.                 x = random.randint(1, five_frequency+four_frequnecy+three_frequency)
  286.                 if x in range(1, five_frequency+1):
  287.                     return random.choice(five_star1)
  288.                 elif x in range(five_frequency+1, five_frequency+four_frequnecy+1):
  289.                     return random.choice(four_star1)
  290.                 elif x in range(five_frequency+four_frequnecy+1, five_frequency+four_frequnecy+three_frequency+1):
  291.                     return random.choice(three_star1)
  292.                 else:
  293.                     return ['!', '!', '!']
  294.     else:
  295.         (five_star1, four_star1, three_star1, five_star2, four_star2) = jackpot2
  296.         (five_frequency, five_minimun_times, five_ipota, four_frequnecy, four_minimun_times, four_ipota, three_frequency, d) = frequency2
  297.         if project == '角色活动祈愿':
  298.             (five_mark, four_mark, last_five, last_four) = minimum_mark(project, d)
  299.             if five_mark == five_minimun_times - 1:  # 五星保底
  300.                 if last_five in [n[2] for n in five_star1]:  # 本期五星保底
  301.                     return random.choice(five_star2)
  302.                 else:  # 小保底
  303.                     x = random.randint(1, 1000)
  304.                     if x in range(1, five_ipota+1):
  305.                         return random.choice(five_star2)
  306.                     else:
  307.                         return random.choice(five_star1)
  308.             else:
  309.                 if four_mark == four_minimun_times - 1:  # 四星保底
  310.                     if last_four in [n[2] for n in four_star1]:  # 本期四星保底
  311.                         return random.choice(four_star2)
  312.                     else:  # 常规四星保底
  313.                         x = random.randint(1, 1000)
  314.                         if x in range(1, four_ipota+1):
  315.                             return random.choice(four_star2)
  316.                         else:
  317.                             return random.choice(four_star1)
  318.                 else:  # 常规
  319.                     x = random.randint(1, five_frequency+four_frequnecy+three_frequency)
  320.                     if x in range(1, five_frequency+1):
  321.                         i = random.randint(1, 1000)
  322.                         if x in range(1, five_ipota+1):
  323.                             return random.choice(five_star2)
  324.                         else:
  325.                             return random.choice(five_star1)
  326.                     elif x in range(five_frequency+1, four_frequnecy+five_frequency+1):
  327.                         i = random.randint(1, 1000)
  328.                         if i in range(1, four_ipota):
  329.                             return random.choice(four_star2)
  330.                         else:
  331.                             return random.choice(four_star1)
  332.                     elif x in range(four_frequnecy+five_frequency+1, three_frequency+four_frequnecy+five_frequency+1):
  333.                         return random.choice(three_star1)
  334.                     else:
  335.                         return['!', '!', '!']
  336.         elif project == '武器活动祈愿':
  337.             (five_mark, four_mark, last_five, last_four, m_value) = minimum_mark(project, d)
  338.             wb = openpyxl.load_workbook(ResidentAwardPoolPath)
  339.             ws = wb[project]
  340.             od_weapon = ws['E1'].value
  341.             if five_mark == five_minimun_times - 1:  # 五星保底
  342.                 if m_value == 2:  # 定轨保底
  343.                     revise_weapon(2)
  344.                     return [5, '武器', od_weapon]
  345.                 else:  # 非定轨保底
  346.                     if last_five in [n[2] for n in five_star1]:  # 本期五星保底
  347.                         j = random.choice(five_star2)
  348.                         if j[2] == od_weapon:
  349.                             revise_weapon(2)
  350.                         return j
  351.                     else:  # 常规五星保底
  352.                         x = random.randint(1, 1000)
  353.                         if x in range(1, five_ipota+1):
  354.                             j = random.choice(five_star2)
  355.                             if j[2] == od_weapon:
  356.                                 revise_weapon(2)
  357.                             else:
  358.                                 revise_weapon(1)
  359.                             return j
  360.                         else:
  361.                             revise_weapon(1)
  362.                             return random.choice(five_star1)
  363.             else:
  364.                 if four_mark == four_minimun_times - 1:  # 四星保底
  365.                     if last_four in [n[2] for n in four_star1]:  # 本期四星保底
  366.                         return random.choice(four_star2)
  367.                     else:  # 常规四星保底
  368.                         x = random.randint(1, 1000)
  369.                         if x in range(1, four_ipota+1):
  370.                             return random.choice(four_star2)
  371.                         else:
  372.                             return random.choice(four_star1)
  373.                 else:  # 常规
  374.                     x = random.randint(1, five_frequency+four_frequnecy+three_frequency)
  375.                     if x in range(1, five_frequency+1):
  376.                         i = random.randint(1, 1000)
  377.                         if x in range(1, five_ipota+1):
  378.                             j = random.choice(five_star2)
  379.                             if j[2] == od_weapon:
  380.                                 revise_weapon(2)
  381.                             return j
  382.                         else:
  383.                             revise_weapon(1)
  384.                             return random.choice(five_star1)
  385.                     elif x in range(five_frequency+1, four_frequnecy+five_frequency+1):
  386.                         i = random.randint(1, 1000)
  387.                         if i in range(1, four_ipota):
  388.                             return random.choice(four_star2)
  389.                         else:
  390.                             return random.choice(four_star1)
  391.                     elif x in range(four_frequnecy+five_frequency+1, three_frequency+four_frequnecy+five_frequency+1):
  392.                         return random.choice(three_star1)
  393.                     else:
  394.                         return['!', '!', '!']

  395. def revise_weapon(mode):
  396.     """武器定轨操作

  397.     Args:
  398.         mode (int): 0:取消定轨;1:正常;2.命值清零;3:修改定轨
  399.     """   
  400.     wb = openpyxl.load_workbook(ResidentAwardPoolPath)
  401.     ws = wb['武器活动祈愿']
  402.     if mode == 0:
  403.         ws['E1'] = None
  404.         ws['G1'] = None
  405.     elif mode == 1:
  406.         if ws['G1'].value != None and ws['E1'].value != None:
  407.             ws['G1'] = ws['G1'].value + 1
  408.         else:
  409.             pass
  410.     elif mode == 2:
  411.         ws['G1'] = 0
  412.     elif mode == 3:
  413.         ws['G1'] = 0
  414.         nl = []
  415.         for row in ws.values:
  416.             l = list(row)
  417.             if  l[0] == 5:
  418.                 nl.append(l[2])
  419.         def ch():
  420.             t = 1
  421.             for n in nl:
  422.                 print('%d : %s'%(t, n))
  423.                 t += 1
  424.             c = int(input('请选择:'))
  425.             if c-1 in range(len(l)):
  426.                 ws['E1'] = nl[c-1]
  427.             else:
  428.                 ch()
  429.         ch()
  430.     wb.save(ResidentAwardPoolPath)

  431. def fecondary_menu(project, remakes=None):  # 二级菜单
  432.     secondary_cycle = 1
  433.     while secondary_cycle:
  434.         lis = get_jackpot2(project, remakes)
  435.         tup = ger_frequency2(project)
  436.         print('1.来十发\n2.来一发\n3.查询抽奖记录\n4.返回上一级\n5.退出')
  437.         choice = int(input('请选择:'))
  438.         if choice == 1:
  439.             for t in range(10):
  440.                 l = luck_draw(project, lis, tup)
  441.                 (star, typ, name) = (l[0], l[1], l[2])
  442.                 keep_records(project, star, typ, name, remakes)
  443.                 outprint(star, typ, name)
  444.         elif choice == 2:
  445.             l = luck_draw(project, lis, tup)
  446.             (star, typ, name) = (l[0], l[1], l[2])
  447.             keep_records(project, star, typ, name, remakes)
  448.             outprint(star, typ, name)
  449.         elif choice == 3:
  450.             query(project)
  451.         elif choice == 4:
  452.             secondary_cycle = 0
  453.         elif choice == 5:
  454.             exit()
  455.         else:
  456.             continue

  457. def main():  # 主菜单
  458.     print('!!!请将 "%s, %s" 文件移动在:%s!!!\n\n'%(
  459.         ResidentAwardPoolPath[2::], WinningProbabilityPath[2::], WD))
  460.     print('='*20 + '欢迎使用原神抽奖模拟系统' + '='*20)
  461.     primary_cycle = 1
  462.     while primary_cycle:
  463.         print('1.常驻祈愿\n2.角色活动祈愿\n3.武器活动祈愿\n4.退出')
  464.         a = int(input('请选择:'))
  465.         if a in (1, 3):
  466.             if a == 1:
  467.                 Project = '常驻祈愿'
  468.             else:
  469.                 Project = '武器活动祈愿'
  470.                 while 1:
  471.                     wb = openpyxl.load_workbook(ResidentAwardPoolPath)
  472.                     ws = wb['武器活动祈愿']
  473.                     od_weapon = ws['E1'].value
  474.                     numerical_value = ws['G1'].value
  475.                     if od_weapon == None and numerical_value == None:
  476.                         print('当前无定轨!')
  477.                     else:
  478.                         print('当前定轨武器:%s\n定轨命值为:%d'%(od_weapon, numerical_value))
  479.                     print('1.继续\n2.修改定轨\n3.取消定轨')
  480.                     c = int(input('请选择:'))
  481.                     if c == 1:
  482.                         break
  483.                     elif c == 2:
  484.                         revise_weapon(3)
  485.                         continue
  486.                     elif c == 3:
  487.                         revise_weapon(0)
  488.                         continue
  489.                     else:
  490.                         continue
  491.             fecondary_menu(Project)
  492.         elif a == 2:
  493.             Project = '角色活动祈愿'
  494.             wb = openpyxl.load_workbook(ResidentAwardPoolPath)
  495.             ws = wb[Project]
  496.             nl = []
  497.             for row in ws.values:
  498.                 l = list(row)
  499.                 if  l[0] == 5:
  500.                     nl.append(l[2])
  501.             def choice():
  502.                 t = 1
  503.                 for n in nl:
  504.                     print('%d : %s池'%(t, n))
  505.                     t += 1
  506.                 c = int(input('请选择:'))
  507.                 if c-1 in range(len(l)):
  508.                     fecondary_menu(Project, remakes='%s'%(nl[c-1]+'池'))
  509.                 else:
  510.                     choice()
  511.             choice()
  512.         elif a == 4:
  513.             primary_cycle = 0
  514.         else:
  515.             continue


  516. if __name__ == '__main__':
  517.     main()
复制代码

yuanshen.zip

20.15 KB, 下载次数: 32

小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2022-5-28 15:30:14 | 显示全部楼层
Windows的cmd中显色用color/?即可查询为甚无人看此贴发到csdn中吧那儿比较八卦
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-5-31 10:46:28 | 显示全部楼层
沐雨尘枫 发表于 2022-5-28 15:30
Windows的cmd中显色用color/?即可查询为甚无人看此贴发到csdn中吧那儿比较八卦

在Ubuntu下没啥问题,到window10就没达到想要的效果
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-4-28 17:58

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表