import time
import random
import os
版本号1=["1.0:软件创造成功,并成功在csdn发行。"]
版本号2=["1.1:修复已知bug,可以查看版本号。][1.1.2:修复已知bug"]
版本号3=["1.2:软件可退出,增强AI学习。"]
版本号4=["1.7:完善AI学习。][1.7.1:修复已知bug。][1.7.2:修复已知bug。][1.7.4:AI学习进行优化。][1.7.6:AI学习进行优化。"]
版本号5=["1.9:添加设置功能。"]
版本号6=["2.0:添加词库。"]
版本号7=["2.2:修复AI重大bug,增强AI学习。"]
版本号8=["2.5:增加保存功能。"]
版本号9=["2.6:调整版本号次序,统一使用中文冒号,调整代码。"]
版本号10=["3.0:结束内测,大致无漏洞,投入运营。"]
userimprovementplan=["1"]
字典1=[]
字典2=[]
字典3=[]
字典4=[]
字典5=[]
leibie=[]
things = []
Autosave=[]
def ceshi():
AI学习 = []
q = 0
while True:
q+1
A = AI学习
a = input( "请输入角色的性别:" )
# 进行测试。
if a == "男":
字典1.append( 1 )
print( "添加成功。" )
break
elif a == "女":
字典1.append( 2 )
print( "添加成功。" )
break
else:
print( "请重新选择,错误码:19。" )
time.sleep( 1 )
print( "请选择角色的性格:\n1 冷酷\n2 热血\n3 善良\n4 残酷" )
while True:
yu = input( "请选择:" )
if yu == "1":
字典2.append( 1 )
print( "添加成功。" )
break
elif yu == "2":
字典2.append( 2 )
print( "添加成功。" )
break
elif yu == "3":
字典2.append( 3 )
print( "添加成功。" )
break
elif yu == "4":
字典2.append( 4 )
print( "添加成功。" )
break
else:
print( "请重新选择,错误码:20。" )
time.sleep( 1 )
print( "请选择角色的爱好:\n1 吃\n2 玩\n3 宅\n4 睡" )
while True:
yu = input( "请选择:" )
if yu == "1":
字典3.append( 1 )
print( "添加成功。" )
break
elif yu == "2":
字典3.append( 2 )
print( "添加成功。" )
break
elif yu == "3":
字典3.append( 3 )
print( "添加成功。" )
break
elif yu == "4":
字典3.append( 4 )
print( "添加成功。" )
break
else:
print( "请重新选择,错误码:21。" )
time.sleep( 1 )
print( "请选择角色的兴趣:\n1 书法\n2 画画\n3 弹琴\n4 下棋\n5 街头\n6 跳舞" )
while True:
yu = input( "请选择:" )
if yu == "1":
字典4.append( 1 )
print( "添加成功。" )
break
elif yu == "2":
字典4.append( 2 )
print( "添加成功。" )
break
elif yu == "3":
字典4.append( 3 )
print( "添加成功。" )
break
elif yu == "4":
字典4.append( 4 )
print( "添加成功。" )
break
elif yu == "5":
字典4.append( 5 )
print( "添加成功。" )
break
elif yu == "6":
字典4.append( 6 )
print( "添加成功。" )
break
else:
print( "请重新选择,错误码:18。" )
time.sleep( 1 )
print( "请选择角色的特殊性:\n1 无\n2 性格分裂\n3 内向" )
while True:
yu = input( "请选择:" )
if yu == "1":
字典5.append( 1 )
print( "添加成功。" )
break
elif yu == "2":
字典5.append( 2 )
print( "添加成功。" )
break
elif yu == "3":
字典5.append( 3 )
print( "添加成功。" )
break
else:
print( "请重新选择,错误码:23。" )
time.sleep( 1 )
print("正在进行 AI创造中。")
x = ["肖", "克", "里", "德", "高", "郝", "建", "团", "夏", "可", "娜", "啦", "倪", "彩","讷","号","瑞","峰","云"]
if 1 in 字典1:
xx=random.choice(x)
else:
x = ["肖", "夏", "可", "娜", "啦", "倪", "彩", "团"]
xx=random.choice( x )
if 1 in 字典2 or 1 in 字典3 or 1 in 字典4 or 1 in 字典5:
m=["离离","翻","旭","德","花鸟","教","时代","发财","上星","厄尔","惹","撒","魏桥","萨想","傲世"]
mm=random.choice(m)
else:
m = ["法", "虚焦", "嘎哈", "东城", "从", "倪发", "聊聊", "江湖","代谢","温情","二万","诞生","犹㼆","一天"]
mm=random.choice( m )
time.sleep(5)
print("创造完毕,请在以下名字中选择符合你心意的名字。")
if "kss" in things:
file = open( "User important information.csls", "r" )
xx = file.read()
print( "为你创造的角色名是:\n%s%s" %(xx,mm))
else:
print("为你创造的角色名是:%s%s"%(xx,mm))
q=input("您对名字喜欢吗?\n1 喜欢\n2 不喜欢\n>")
if 1 in Autosave:
file = open( "Autosave.txt", "w" )
file.write( "%s%s\n" % (xx,mm) )
file.close()
else:
save=input("是否开启自动保存?\n1 是\n2 否")
if save=="1":
if 1 in Autosave:
print("尚未关闭")
time.sleep(1)
else:
print("已开启,下次使用生效。")
time.sleep(1)
Autosave.append(1)
else:
print("保存功能未开启,保存不起效(如需开启,请去设置。)。")
time.sleep(1)
file = open( "User important information.csls", "w" )
file.write( "%s\n" % xx )
file.close()
if q=="1":
file=open( "User important information.csls", "r" )
cs=file.read()
print("已保存:",cs)
AI学习.append( xx )
things.append( "kss" )
else:
things.clear()
print("感谢您的反馈,我会根据您的建议来为您设置个性化推荐。")
time.sleep(1)
print("已经为您设置个性化推荐。")
time.sleep(1)
def 网名():
leibie.append( 1 )
print("添加成功。")
ceshi()
def 笔名():
leibie.append( 2 )
print( "添加成功。" )
ceshi()
def 真名():
leibie.append( 3 )
print( "添加成功。" )
ceshi()
while True:
q=input("请选择操作:\n1 进入小程序\n2 查看版本号\n3 设置\n4 退出\n")
i = os.system( "cls" )
if q=="1":
print("欢迎来到名字建造器。\n请选择您要建造的名字类型:")
while True:
name = int(input("1 网名\n2 笔名\n3 真名\n4 退出\n请选择(输入序号):"))
if name==1:
网名()
elif name==2:
笔名()
elif name==3:
真名()
elif name==4:
break
else:
print("请重新输入。")
elif q=="3":
while True:
print("目前可设置:\n1 参加用户改进计划\n2 自动保存\n3 退出")
qw=input("选择:")
if qw=="1":
t=input("请选择\n1 开启(默认)\n2 关闭")
if t=="1":
if 1 in userimprovementplan:
print("尚未关闭。")
else:
print("已开启。")
userimprovementplan.append(1)
else:
if 1 in userimprovementplan:
print("已关闭。")
userimprovementplan.clear()
else:
print("尚未开启。")
elif qw=="3":
break
elif qw=="2":
t=input("请选择\n1 开启(默认)\n2 关闭")
if t=="1":
if 1 in Autosave:
print("尚未关闭。")
else:
print("已开启。")
Autosave.append(1)
else:
if 1 in Autosave:
print("已关闭。")
Autosave.clear()
else:
print("尚未开启。")
else:
print("设置失败。")
elif q=="4":
exit()
else:
print("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s"%(版本号1,版本号2,版本号3,版本号4,版本号5,版本号6,版本号7,版本号8,版本号9,版本号10))