石头剪刀布,顾名思义
import random import time print("作者:lx. 官网lxzsnb.com") print("当前版本号:1.0.3") print("更新时间:2021/9/19") print("欢迎来到石头剪刀布游戏") print("请输入您的游戏账号[请输入数字],没有就瞎输入一个") account = int(input()) coin = int(random.randint(100,500)) dc = int(random.randint(1,3)) print("创建账号成功,您获得了",coin,"个金币") if account == 54188: coin = coin + 541880000 print("您额外获得了541880000个金币") while coin > 10: print("您现在有",coin,"个金币") print("输入任意建开始游戏") input() print("匹配中……") time.sleep(2.3) print("匹配成功!") print("入场费:-10个金币") coin = coin - 10 print("请输入您要压的金币数(如果大于您所拥有的金币数代表您压您全部的金币)") ya = int(input()) if ya < 1: print("不可以这么输入,既然这样,就给你的金币数加上这个数吧") time.sleep(1) coin = coin + ya print("你获得了",ya,"个金币") continue if ya > coin: ya = coin print("您选择了ALL IN,您的底分为",ya,"分") else: print("您选择的底分为",ya,"分") ya0 = int(ya*0.5) ya2 = int(ya*1.5) ya1 = int(random.randint(ya0,ya2)) print("您的对手压分为",ya1,"分") time.sleep(0.5) z = ya + ya1 print("本轮总分为",z,"分,开始划拳!") k = 0 f1 = 0 f2 = 0 while k < 4: k = k + 1 print("本局采取三局两胜制,这是第",k,"局") ds = int(random.randint(1,3)) print("请选择您的想要出的拳:1(代表石头),2(代表剪刀),3(代表布)") w = int(input()) tt = random.randint(0,2) time.sleep(tt) if ds == 1: print("对方出了石头") if ds == 2: print("对方出了剪刀") if ds == 3: print("对方出了布") time.sleep(0.8) if 0 < w < 4: if ds == w: print("平局!本回合双方都不得分!") k = k - 1 else: if (w == 1 and ds == 2) or (w == 2 and ds == 3) or (w == 3 and ds == 1): print("本回合你获胜了!") f1 = f1 + 1 else: print("本回合你输了!") f2 = f2 + 1 else: print("犯规!你输错数字了,对方加一分!") f2 = f2 + 1 time.sleep(0.8) print("现在的比分结果:",f1,":",f2) if k == 3 or f1 == 2 or f2 == 2: break if f1 > f2: print("最终你赢了!!!") coin = coin + ya1 if f1 < f2: print("最终你输了。。。") coin = coin - ya if coin < 11: if dc > 0: print("您现在有",coin,"个金币,买不起门票了,不能继续游戏") time.sleep(1.5) print("天降洪福---您获得了补助金---50金币") dc = dc - 1 coin = coin + 50 print("。。。连个人机都打不过") print("你口袋里的",coin,"个金币抠脚就能数过来") print("输入任意键后拜拜") input()