这是我用Python做了14天的游戏
希望能火
不求点赞和收藏
from time import *
from os import *
from sys import *
from random import *
# 张海悦原创!
# 全部代码
def game():
def ff (text):
stdout.flush()
for df in text:
stdout.write(df)
stdout.flush()
sleep(0.099)
def fs (text):
stdout.flush()
for df in text:
stdout.write(df)
stdout.flush()
sleep(0.9)
def fff (text):
stdout.flush()
for df in text:
stdout.write(df)
stdout.flush()
sleep(0.09)
def ffff (text):
stdout.flush()
for df in text:
stdout.write(df)
stdout.flush()
sleep(0.009)
def t(a):
for x in range(len(a)):
if a[x]=="1":
print("\033[41m ",end="")
elif a[x]=="2":
print("\033[42m ",end="")
elif a[x]=="3":
print("\033[43m ",end="")
elif a[x]=="4":
print("\033[44m ",end="")
elif a[x]=="5":
print("\033[45m ",end="")
elif a[x]=="6":
print("\033[46m ",end="")
elif a[x]=="7":
print("\033[47m ",end="")
elif a[x]=="8":
print("\033[48m ",end="")
elif a[x]=="9":
print("\033[49m ",end="")
elif a[x]=="0":
print("\033[40m ",end="")
elif a[x]=="q":
print("\033[31m",end="")
elif a[x]=="w":
print("\033[32m",end="")
elif a[x]=="e":
print("\033[33m",end="")
elif a[x]=="r":
print("\033[34m",end="")
elif a[x]=="t":
print("\033[35m",end="")
elif a[x]=="y":
print("\033[36m",end="")
elif a[x]=="u":
print("\033[92m",end="")
else:
print(a[x],end="")
print("\033[0m")
def wood_progress_bar():
for i in range(1, 31):
print("\r", end="")
print("Felling progress: {}%: ".format(i + 70), "▋" * (i // 2), end="")
stdout.flush()
sleep(0.05)
def iron_progress_bar():
for i in range(