如何在足球编码游戏中添加图形

时间:2019-02-25 04:59:02

标签: python-3.x

我已经制作了一款游戏,其中您可以输入想要玩的游戏,并根据获得结果的可能性进行输入。这是我的代码的作用之一。

if usinp == "yes" or "Yes":
print ("You are playing the Packers in OT of the 2014 NFC championship game.")
firplay = input("It's your ball on the Seattle 13. The defense is in cover 2. What play do you want to run? HB gut, Hail Mary, or WR screen pass? \n")
if firplay == "HB gut":
    import random
    _1 = "You Gained 3 yards now it is 2nd and 7 from your own 16"
    _2 = "You Gained 3 yards now it is 2nd and 7 from your own 16"
    _3 = "Yay you scored a 97 yard touchdown. This scenario is over. YOU WIN"
    _4 = "Yay you scored a 97 yard touchdown. This scenario is over. YOU WIN"
    _5 = "Yay you scored a 97 yard touchdown. This scenario is over. YOU WIN"
    _6 = "Ah, Your team commited a turnover. This scenario is over. YOU LOSE!"
    _7 = "Ah, Your team commited a turnover. This scenario is over. YOU LOSE!"
    _8 = "Ah, Your team commited a turnover. This scenario is over. YOU LOSE!"
    _9 = "You Gained 3 yards now it is 2nd and 7 from your own 16"
    _10 = "You Gained 3 yards now it is 2nd and 7 from your own 16"

    PossibleOutcomes = [_1,_2,_3,_4,_5,_6,_7,_8,_9,_10]
    mychoice = random.choice(PossibleOutcomes)
    print(mychoice)  
    if "Yay you scored a 97 yard touchdown. This scenario is over. YOU WIN" == mychoice:
        print ("You would be an amazing head coach and luck will always be on your side")

    elif "You Gained 3 yards now it is 2nd and 7 from your own 16" == mychoice:
        _2play = input ("It's your ball on the Seattle 16. The defense is in cover 2. What play do you want to run? Bubble catch, Stop and go, or Hook and ladder?")

    else:
        print("You would be a horrible head coach your team will never make the playoffs and you will be fired.")

我要添加的是它显示播放器以动态图形和播放器出现在屏幕上的结果。

0 个答案:

没有答案