Python人生重开模拟器(高级版)
Posted 东海ECS
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python人生重开模拟器(高级版)相关的知识,希望对你有一定的参考价值。
目录
目录
前言
这是可以控制的人生重开模拟器,灵活应用了面向对象、线程等进阶Python方法.
游戏成果
截图
可以看到,游戏有商店,背包,学习,属性,学校,成长等功能
开始吧
游戏主框架
游戏主框架如下:
import random
import time
import threading
class Peple:
"""
定义一个人类
"""
def __init__(self):
pass
class Store:
"""
定义一个商店类
"""
def __init__(self):
pass
class School:
"""
定义一个学校类
"""
def __init__(self):
pass
# #####Begin##### #
定义人类属性
人类有颜值,智力,体质,家境,性别,身份,背包,岁数,知识,钱等属性.下面我们来定义这些属性
class Peple:
"""
定义一个人类
"""
# 颜值
face = 0
# 智力
iq = 0
# 体质
strong = 0
# 家境
home = 0
# 性别,true男false女
sex = False
# 身份
identity = ''
# 背包字典
bag =
# 岁数
old = 0
# 知识
knowledge = 0
point = 0
# 钱
dollars = 0
# 是否在学校
isInSchool = False
def __init__(self):
pass
定义人类方法
定义身份判断方法
注:这里的身份名称是由CSDN博主「HaiFan.」的文章人生重开模拟器(简版)中的代码得来的.
class Peple:
"""
定义一个人类
"""
# 颜值
face = 0
# 智力
iq = 0
# 体质
strong = 0
# 家境
home = 0
# 性别,true男false女
sex = False
# 身份
identity = ''
# 背包字典
bag =
# 岁数
old = 0
# 知识
knowledge = 0
point = 0
# 钱
dollars = 0
# 是否在学校
isInSchool = False
def __init__(self):
pass
def identiyJudgment(self):
"""身份判断"""
# self.identity = ''
if self.home == 10:
self.identity = '出生在帝都,父母是世界首富.'
self.dollars += random.randint(100, 10000000)
elif 7 <= self.home <= 9:
if self.point == 1:
self.identity = '出生在一线城市,父母是医生.'
self.face += 2
self.dollars += random.randint(10, 200)
elif self.point == 2:
self.identity = '出生在一线城市,父母是资深程序员.'
self.iq += 2
self.dollars += random.randint(100, 10000)
else:
self.identity = '出生在一线城市,父母是健身教练.'
self.strong += 3
self.face += 1
self.iq -= 1
self.dollars += random.randint(30, 300)
elif 4 <= self.home <= 6:
if self.point == 1:
self.identity = '出生在三线城市,父母是企业管理.'
self.iq += 1
self.dollars += random.randint(50, 10000)
elif self.point == 2:
self.identity = '出生在三线城市,父母是小学老师.'
self.iq += 1
self.dollars += random.randint(10, 100)
else:
self.identity = '出生在三线城市,父母是自己开店做生意.'
self.home += 1
self.dollars += random.randint(100, 1000)
else:
if self.point == 1:
self.identity = '出生在农村,父母是农民.'
self.strong += 2
self.face -= 1
self.dollars += random.randint(3, 10)
elif self.point == 2:
self.identity = '出生在山里,父母是猎人.'
self.strong += 2
self.home -= 1
self.face -= 1
self.dollars += random.randint(5, 20)
else:
self.identity = '你出生在小镇上,父母是镇长.'
self.face += 1
self.home += 1
self.dollars += random.randint(80, 100)
定义初始化方法
其实就是__init__方法啦,初始化,随机生成属性
def __init__(self):
"""初始化属性"""
self.face = random.randint(1, 10)
self.iq = random.randint(1, 10)
self.strong = random.randint(1, 10)
self.home = random.randint(1, 10)
if random.randint(1, 2) == 1:
self.sex = True
else:
self.sex = False
self.point = random.randint(1, 6)
大家都看得懂吧,我不多讲了
定义成长方法
玩家每10秒都会成长一岁,每个年龄段属性都有变化
def growUp(self):
"""成长"""
while True:
# 10秒成长一岁
time.sleep(10)
self.old += 1
print('') # 换行
print('你', self.old, '岁了')
if self.old == 12:
print('你进入了青春期,身体变得强壮了,体质加二')
self.strong += 2
elif self.old == 30:
print('三十而立,颜值,智力,体质各加1')
self.face += 1
self.iq += 1
self.strong += 1
elif self.old == 40:
print('四十而不惑,中年时期开始,智力加2')
self.iq += 2
elif self.old == 50:
print('五十而知天命,颜值,体质减1')
self.face -= 1
self.strong -= 1
elif self.old == 60:
print('六十而耳顺,老年时期开始,颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 70:
print('七十而从心所欲,不逾矩.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 80:
print('已到耄耋时期.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 90:
print('耄耋时期.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 100:
print('已到期颐之年.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
大家都看得懂吧,我不多讲了
定义显示属性方法
游戏的很多地方都用到显示属性的时候,这里我们定义一个显示属性的方法.
def show(self):
"""显示属性"""
print(f'''
╔════════════════════╦════════════════════╗
║ 颜 值 ║ self.face ║
╠════════════════════╬════════════════════╣
║ 智 力 ║ self.iq ║
║════════════════════╬════════════════════║
║ 体 质 ║ self.strong ║
╠════════════════════╬════════════════════╣
║ 家 境 ║ self.home ║
╠════════════════════╬════════════════════╣
║ 性 别 ║ sex ║
╠════════════════════╬════════════════════╣
║ 知 识 ║ self.knowledge ║
╚════════════════════╩════════════════════╝
''')
大家都看得懂吧,我不多讲了
定义打开背包方法
游戏里有以下道具:
- 强壮药水,使用后体质加一
- 智力药水,使用后智力加一
- 美容药水,使用后颜值加一
- 彩票,可能中奖
打开背包可以使用这些道具.
代码实现:
1.显示物品:
def openBag(self):
"""打开背包"""
print('背包:')
print('╔════════════════════════╦═══════════════════════╗')
print('║ 道 具 ║ 数 量 ║')
print('╠════════════════════════╬═══════════════════════╣')
for key, value in self.bag.items():
print(f'║ key ║ value ║')
print('╠═══════════════════════╬═══════════════════════╣')
大家都看得懂吧,我不多讲了
2.使用物品:
使用物品的框架:
while True:
try:
pass
except:
pass
输入:
while True:
try:
command = input('请输入需要使用的道具,0退出:')
if command == 0:
break
判断是否有这个道具:
while True:
try:
command = input('请输入需要使用的道具,0退出:')
if command == 0:
break
if self.bag[command] >= 1:
pass
使用道具:
while True:
try:
command = input('请输入需要使用的道具,0退出:')
if command == 0:
break
if self.bag[command] >= 1:
if command == '强壮药水':
self.strong += 1
print('你使用了强壮药水,体质加一')
self.bag[command] -= 1
elif command == '智力药水':
self.iq += 1
print('你使用了智力药水,智力加一')
self.bag[command] -= 1
elif command == '美容药水':
self.face += 1
print('你使用了美容药水,颜值加一')
self.bag[command] -= 1
还有个彩票:
elif command == '彩票':
a = random.randint(1, 10)
# 如果抽中6,得大奖
if a == 6:
self.dollars += 5000000
print('恭喜你获得500W大奖!')
# 如果抽中2,得小奖
if a == 2:
self.dollars += 500
print('恭喜你获得500奖励!')
if a != 6 and a != 2:
print('很遗憾,没中奖.')
self.bag[command] -= 1
这个彩票,是先在1与10之间去随机数,如果取到6,就中大奖,如果取到2,中小奖,否则没中奖.
使用完之后的操作:
command = eval(input('是否继续?1或2:'))
if command == 1:
continue
elif command == 2:
break
else:
print('错误')
continue
异常处理:
except:
print('输入有误!')
continue
大家都看得懂吧,我不多讲了
定义学习方法
玩家可以通过学习来增长知识,玩家答对了系统给出的随机问题,就算学习成功,智力越高,学习效率越大,在学校学习的话学习成功乘以2
def study(self):
"""学习"""
while True:
try:
a = random.randint(100000, 1000000)
b = random.randint(100000, 1000000)
c = eval(input(f'a + b = '))
if c == a + b:
if not self.isInSchool:
self.knowledge += 1 * self.iq
print(f'回答正确,知识+1 * self.iq,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
else:
self.knowledge += 2 * self.iq
print(f'良好的学习环境使你事半功倍,知识+2 * self.iq,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
else:
print('回答错误,继续努力,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
except:
print('错误,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
大家都看得懂吧,我不多讲了
现在,人类方法定义完了!
定义商店属性
商店只有一个属性----商品,这个商品我们用字典来表示,key为商品名,value为价格.
class Store:
"""
定义一个商店类
"""
# 商品字典
wares =
def __init__(self):
pass
定义商店方法
1.初始化方法
设置商品字典.
class Store:
"""
定义一个商店类
"""
# 商品字典
wares =
def __init__(self):
self.wares =
'强壮药水': 20,
'智力药水': 20,
'美容药水': 20,
'彩票': 20
2.进入商店的方法
进入商店有买东西的行为.
def init(self):
print('你进入了商店')
print('商品列表:')
print('╔════════════════════════╦═══════════════════════╗')
print('║ 商 品 ║ 价 格 ║')
print('╠════════════════════════╬═══════════════════════╣')
for key, value in self.wares.items():
print(f'║ key ║ value ║')
print('╠═══════════════════════╬═══════════════════════╣')
print('您的钱数:', my.dollars)
while True:
a = input('输入商品名称,或输入0退出')
if a == '0':
break
else:
try:
dollars = self.wares[a]
if my.dollars < dollars:
print('钱不足')
b = input('是否重新输入?(是:1,否:2)')
if b == '1':
continue
elif b == '2':
break
else:
print('错误')
else:
my.dollars -= dollars
try:
my.bag[a] += 1
except:
my.bag[a] = 1
print('购买成功')
except:
print('错误')
b = input('是否重新输入?(是:1,否:2)')
if b == '1':
continue
elif b == '2':
break
else:
print('错误')
大家都看得懂吧,我不多讲了
注意:方法里面的''my''是人类Peple的实例,游戏开始是定义的.
OK,商店类定义完了.
定义学校方法
学校没有初始化方法.
1.进入学校
def init(self):
print('你进入了学校,这里学习氛围良好,学习知识×2')
my.isInSchool = True
my.study()
self.leaveIt()
2.离开学校
def leaveIt(self):
print('你离开了学校')
my.isInSchool = False
大家都看得懂吧,我不多讲了
OK,学校类定义完了.
定义函数
定义显示主菜单的函数
主菜单包含一下命令:
- 去商店
- 打开背包
- 学习
- 显示属性
- 如果年龄小于22岁,可以去学校
def showMainMenu():
"""显示主菜单"""
while True:
print('主菜单')
print('命令:')
print('去商店(1)')
print('打开背包(2)')
print('学习(3)')
print('显示属性(4)')
if my.old <= 22:
print('去学校(5)')
try:
command = eval(input('输入命令...'))
if command == 1:
store.init()
elif command == 2:
my.openBag()
elif command == 3:
my.study()
elif command == 4:
my.show()
elif command == 5:
school.init()
else:
pass
except:
pass
大家都看得懂吧,我不多讲了
OK,主菜单函数定义完了.
定义主函数
有人可能要问了,主函数?为什么不用if __name__ == '__main__'呢?
这是因为,我要创建线程.
def main():
"""用于线程的主方法"""
input('请按Enter键继续...')
while True:
showMainMenu()
大家都看得懂吧,我不多讲了
OK,主函数定义完了.
定义成长函数
很简单,直接调用实例的growUp方法
def growUp():
my.growUp()
游戏开始
初始化
# ##### Begin ##### #
print("******************************************")
print("* *")
print("* 人生重开模拟器 *")
print("* *")
print("* *")
print("* *")
print("******************************************")
print('')
print('加载中', end = '')
for i in range(3):
print('.', end = '')
time.sleep(1)
my = Peple() # 实例化自己对象
print('')
print('')
print('初始化成功')
sex = '男'
if my.sex:
sex = '男'
else:
sex = '女'
my.show()
# # ╔ ╦ ╗ ╠ ╬ ╣ ╚ ╩ ╝ ═ ╞ ╟ ╡ ╢ ╪ ║ ╤ ╥ ╧ ╨ ╫
# print(f'''
# ╔════════════════════╦════════════════════╗
# ║ 颜 值 ║ my.face ║
# ╠════════════════════╬════════════════════╣
# ║ 智 力 ║ my.iq ║
# ║════════════════════╬════════════════════║
# ║ 体 质 ║ my.strong ║
# ╠════════════════════╬════════════════════╣
# ║ 家 境 ║ my.home ║
# ╠════════════════════╬════════════════════╣
# ║ 性 别 ║ sex ║
# ╚════════════════════╩════════════════════╝
# ''')
input('请按Enter键继续...')
# 身份
my.identiyJudgment()
print('你', my.identity)
# print(f'''
# ╔════════════════════╦════════════════════╗
# ║ 颜 值 ║ my.face ║
# ╠════════════════════╬════════════════════╣
# ║ 智 力 ║ my.iq ║
# ║════════════════════╬════════════════════║
# ║ 体 质 ║ my.strong ║
# ╠════════════════════╬════════════════════╣
# ║ 家 境 ║ my.home ║
# ╠════════════════════╬════════════════════╣
# ║ 性 别 ║ sex ║
# ╚════════════════════╩════════════════════╝
# ''')
my.show()
store = Store()
school = School()
大家都看得懂吧,我不多讲了
创建线程
上面我们定义了成长方法,但是,成长需要等待,等待期间不能做任何事.而我们又要操作,怎么办?
这个时候,我们要在一个时间,同时进行两个任务----操作与成长
我们可以用线程来同时进行这两个任务.
threads = [threading.Thread(target = main), threading.Thread(target = growUp)]
for i in threads:
i.start()
# input('请按Enter键继续...')
# store = Store()
# store.init()
# ###### End ###### #
上面代码的第一行我们创建了一个线程列表来执行这两个线程,再开始这两个线程,就可以同时进行这两个任务啦
代码
OK,整个游戏我们都开发出来了,这是整个游戏的代码:
"""
人生重开模拟器
花有重开日,人无再少年.
"""
import random
import time
import threading
class Peple:
"""
定义一个人类
"""
# 颜值
face = 0
# 智力
iq = 0
# 体质
strong = 0
# 家境
home = 0
# 性别,true男false女
sex = False
# 身份
identity = ''
# 背包字典
bag =
# 岁数
old = 0
# 知识
knowledge = 0
point = 0
# 钱
dollars = 0
# 是否在学校
isInSchool = False
def __init__(self):
"""初始化属性"""
self.face = random.randint(1, 10)
self.iq = random.randint(1, 10)
self.strong = random.randint(1, 10)
self.home = random.randint(1, 10)
if random.randint(1, 2) == 1:
self.sex = True
else:
self.sex = False
self.point = random.randint(1, 6)
def identiyJudgment(self):
"""身份判断"""
# self.identity = ''
if self.home == 10:
self.identity = '出生在帝都,父母是世界首富.'
self.dollars += random.randint(100, 10000000)
elif 7 <= self.home <= 9:
if self.point == 1:
self.identity = '出生在一线城市,父母是医生.'
self.face += 2
self.dollars += random.randint(10, 200)
elif self.point == 2:
self.identity = '出生在一线城市,父母是资深程序员.'
self.iq += 2
self.dollars += random.randint(100, 10000)
else:
self.identity = '出生在一线城市,父母是健身教练.'
self.strong += 3
self.face += 1
self.iq -= 1
self.dollars += random.randint(30, 300)
elif 4 <= self.home <= 6:
if self.point == 1:
self.identity = '出生在三线城市,父母是企业管理.'
self.iq += 1
self.dollars += random.randint(50, 10000)
elif self.point == 2:
self.identity = '出生在三线城市,父母是小学老师.'
self.iq += 1
self.dollars += random.randint(10, 100)
else:
self.identity = '出生在三线城市,父母是自己开店做生意.'
self.home += 1
self.dollars += random.randint(100, 1000)
else:
if self.point == 1:
self.identity = '出生在农村,父母是农民.'
self.strong += 2
self.face -= 1
self.dollars += random.randint(3, 10)
elif self.point == 2:
self.identity = '出生在山里,父母是猎人.'
self.strong += 2
self.home -= 1
self.face -= 1
self.dollars += random.randint(5, 20)
else:
self.identity = '你出生在小镇上,父母是镇长.'
self.face += 1
self.home += 1
self.dollars += random.randint(80, 100)
def growUp(self):
"""成长"""
while True:
# 10秒成长一岁
time.sleep(10)
self.old += 1
print('') # 换行
print('你', self.old, '岁了')
if self.old == 12:
print('你进入了青春期,身体变得强壮了,体质加二')
self.strong += 2
elif self.old == 30:
print('三十而立,颜值,智力,体质各加1')
self.face += 1
self.iq += 1
self.strong += 1
elif self.old == 40:
print('四十而不惑,中年时期开始,智力加2')
self.iq += 2
elif self.old == 50:
print('五十而知天命,颜值,体质减1')
self.face -= 1
self.strong -= 1
elif self.old == 60:
print('六十而耳顺,老年时期开始,颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 70:
print('七十而从心所欲,不逾矩.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 80:
print('已到耄耋时期.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 90:
print('耄耋时期.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
elif self.old == 100:
print('已到期颐之年.颜值,体质,智力减1')
self.face -= 1
self.strong -= 1
self.iq -= 1
def show(self):
"""显示属性"""
print(f'''
╔════════════════════╦════════════════════╗
║ 颜 值 ║ self.face ║
╠════════════════════╬════════════════════╣
║ 智 力 ║ self.iq ║
║════════════════════╬════════════════════║
║ 体 质 ║ self.strong ║
╠════════════════════╬════════════════════╣
║ 家 境 ║ self.home ║
╠════════════════════╬════════════════════╣
║ 性 别 ║ sex ║
╠════════════════════╬════════════════════╣
║ 知 识 ║ self.knowledge ║
╚════════════════════╩════════════════════╝
''')
def openBag(self):
"""打开背包"""
print('背包:')
print('╔════════════════════════╦═══════════════════════╗')
print('║ 道 具 ║ 数 量 ║')
print('╠════════════════════════╬═══════════════════════╣')
for key, value in self.bag.items():
print(f'║ key ║ value ║')
print('╠═══════════════════════╬═══════════════════════╣')
while True:
try:
command = input('请输入需要使用的道具,0退出:')
if command == 0:
break
if self.bag[command] >= 1:
if command == '强壮药水':
self.strong += 1
print('你使用了强壮药水,体质加一')
self.bag[command] -= 1
elif command == '智力药水':
self.iq += 1
print('你使用了智力药水,智力加一')
self.bag[command] -= 1
elif command == '美容药水':
self.face += 1
print('你使用了美容药水,颜值加一')
self.bag[command] -= 1
elif command == '彩票':
a = random.randint(1, 10)
# 如果抽中6,得大奖
if a == 6:
self.dollars += 5000000
print('恭喜你获得500W大奖!')
# 如果抽中2,得小奖
if a == 2:
self.dollars += 500
print('恭喜你获得500奖励!')
if a != 6 and a != 2:
print('很遗憾,没中奖.')
self.bag[command] -= 1
command = eval(input('是否继续?1或2:'))
if command == 1:
continue
elif command == 2:
break
else:
print('错误')
continue
except:
print('输入有误!')
continue
def study(self):
"""学习"""
while True:
try:
a = random.randint(100000, 1000000)
b = random.randint(100000, 1000000)
c = eval(input(f'a + b = '))
if c == a + b:
if not self.isInSchool:
self.knowledge += 1 * self.iq
print(f'回答正确,知识+1 * self.iq,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
else:
self.knowledge += 2 * self.iq
print(f'良好的学习环境使你事半功倍,知识+2 * self.iq,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
else:
print('回答错误,继续努力,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
except:
print('错误,是否继续学习?1或2')
try:
d = eval(input())
if d == 1:
continue
elif d == 2:
break
else:
print('错误')
continue
except:
print('错误')
continue
class Store:
"""
定义一个商店类
"""
# 商品字典
wares =
def __init__(self):
self.wares =
'强壮药水': 20,
'智力药水': 20,
'美容药水': 20,
'彩票': 20
def init(self):
print('你进入了商店')
print('商品列表:')
print('╔════════════════════════╦═══════════════════════╗')
print('║ 商 品 ║ 价 格 ║')
print('╠════════════════════════╬═══════════════════════╣')
for key, value in self.wares.items():
print(f'║ key ║ value ║')
print('╠═══════════════════════╬═══════════════════════╣')
print('您的钱数:', my.dollars)
while True:
a = input('输入商品名称,或输入0退出')
if a == '0':
break
else:
try:
dollars = self.wares[a]
if my.dollars < dollars:
print('钱不足')
b = input('是否重新输入?(是:1,否:2)')
if b == '1':
continue
elif b == '2':
break
else:
print('错误')
else:
my.dollars -= dollars
try:
my.bag[a] += 1
except:
my.bag[a] = 1
print('购买成功')
except:
print('错误')
b = input('是否重新输入?(是:1,否:2)')
if b == '1':
continue
elif b == '2':
break
else:
print('错误')
class School:
"""
定义一个学校类
"""
def __init__(self):
pass
def init(self):
print('你进入了学校,这里学习氛围良好,学习知识×2')
my.isInSchool = True
my.study()
self.leaveIt()
def leaveIt(self):
print('你离开了学校')
my.isInSchool = False
def showMainMenu():
"""显示主菜单"""
while True:
print('主菜单')
print('命令:')
print('去商店(1)')
print('打开背包(2)')
print('学习(3)')
print('显示属性(4)')
if my.old <= 22:
print('去学校(5)')
try:
command = eval(input('输入命令...'))
if command == 1:
store.init()
elif command == 2:
my.openBag()
elif command == 3:
my.study()
elif command == 4:
my.show()
elif command == 5:
school.init()
else:
pass
except:
pass
def main():
"""用于线程的主方法"""
input('请按Enter键继续...')
while True:
showMainMenu()
def growUp():
my.growUp()
pass
# ##### Begin ##### #
print("******************************************")
print("* *")
print("* 人生重开模拟器 *")
print("* *")
print("* *")
print("* *")
print("******************************************")
print('')
print('加载中', end = '')
for i in range(3):
print('.', end = '')
time.sleep(1)
my = Peple() # 实例化自己对象
print('')
print('')
print('初始化成功')
sex = '男'
if my.sex:
sex = '男'
else:
sex = '女'
my.show()
# # ╔ ╦ ╗ ╠ ╬ ╣ ╚ ╩ ╝ ═ ╞ ╟ ╡ ╢ ╪ ║ ╤ ╥ ╧ ╨ ╫
# print(f'''
# ╔════════════════════╦════════════════════╗
# ║ 颜 值 ║ my.face ║
# ╠════════════════════╬════════════════════╣
# ║ 智 力 ║ my.iq ║
# ║════════════════════╬════════════════════║
# ║ 体 质 ║ my.strong ║
# ╠════════════════════╬════════════════════╣
# ║ 家 境 ║ my.home ║
# ╠════════════════════╬════════════════════╣
# ║ 性 别 ║ sex ║
# ╚════════════════════╩════════════════════╝
# ''')
input('请按Enter键继续...')
# 身份
my.identiyJudgment()
print('你', my.identity)
# print(f'''
# ╔════════════════════╦════════════════════╗
# ║ 颜 值 ║ my.face ║
# ╠════════════════════╬════════════════════╣
# ║ 智 力 ║ my.iq ║
# ║════════════════════╬════════════════════║
# ║ 体 质 ║ my.strong ║
# ╠════════════════════╬════════════════════╣
# ║ 家 境 ║ my.home ║
# ╠════════════════════╬════════════════════╣
# ║ 性 别 ║ sex ║
# ╚════════════════════╩════════════════════╝
# ''')
my.show()
store = Store()
school = School()
threads = [threading.Thread(target = main), threading.Thread(target = growUp)]
for i in threads:
i.start()
# input('请按Enter键继续...')
# store = Store()
# store.init()
# ###### End ###### #
花有重开日,人无再少年!好好珍惜当下吧!
最后,感谢你看到这里,点个赞,作者正在升级可保存数据的数据库版人生重开模拟器,您的支持,是我创作最大的动力!
以上是关于Python人生重开模拟器(高级版)的主要内容,如果未能解决你的问题,请参考以下文章