Beispiel #1
0
                card2 = temporary2.TakeFromBottom()
                player1deck.AddToBottom(card1)
                player1deck.AddToBottom(card2)
                templen = temporary.FindLength()
                templen2 = temporary2.FindLength()

    if (better2 > better1):
        player2deck.AddToBottom(player1draw)
        player2deck.AddToBottom(player2draw)
        if (templen != 0 and templen2 != 0):
            while (templen != 0):
                card1 = temporary.TakeFromBottom()
                card2 = temporary2.TakeFromBottom()
                player2deck.AddToBottom(card1)
                player2deck.AddToBottom(card2)
                templen = temporary.FindLength()
                templen2 = temporary2.FindLength()

    if (better1 == better2):
        temporary.AddToBottom(player1draw)
        temporary2.AddToBottom(player2draw)
    test1 = player1deck.FindLength()

    test2 = player2deck.FindLength()

    print("The score is {} to {} ({} to {})".format(test1, test2, player1,
                                                    player2))
if (test1 > test2):
    print("Congrats {}, you beat {}.".format(player1, player2))
else:
    print("Congrats {}, you beat {}.".format(player2, player1))