if ai == 1 and rock == True:
lblr = tkinter.Label(menuwol, text="Neither win, the both of you picked rocks.")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 1 and paper == True:
lblr = tkinter.Label(menuwol, text="Computer picked rock, you picked paper, you win!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 1 and sissors == True:
lblr = tkinter.Label(menuwol, text="Computer picked rock, you picked sissors, computer wins!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 2 and rock == True:
lblr = tkinter.Label(menuwol, text="Computer picked paper, you picked rock, computer wins!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 2 and paper == True:
lblr = tkinter.Label(menuwol, text="Neither win, both of you picked paper.")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 2 and sissors == True:
lblr = tkinter.Label(menuwol, text="Computer picked paper, you picked sissors, you win!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 3 and rock == True:
lblr = tkinter.Label(menuwol, text="Computer picked sissors, you picked rock, you win!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 3 and paper == True:
lblr = tkinter.Label(menuwol, text="Computer picked sissors, you picked paper, computer wins!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
elif ai == 3 and sissors == True:
lblr = tkinter.Label(menuwol, text="Neither win, both of you picked sissors.")
time.sleep(1)
menuwol.destroy()
lblr.pack()
else:
lblr = tkinter.Label(menuwol, text="Error BOIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII!!!")
time.sleep(1)
menuwol.destroy()
lblr.pack()
我正在尝试制作一个石头,纸,剪刀的游戏和不一致的使用标签和空格的缩进错误出现,即使我的代码是好的。
我该怎么解决?
我已经在记事本++、Visual Studios和默认python IDLE中重新编写了代码。
任何帮助都将不胜感激。