我正在制作顶级特朗普风格的游戏,一旦一方获胜,他们就会得到对方的卡,效果很好,但是随后他们不得不将卡“放到后面”,这是我努力的目标。如何将元素移到末尾?
if pWin == True: # If the player wins, they get the computer's card
player.append(computer[0])
computer.pop(0)
else: # If the computer wins, they get the player's card
computer.append(player[0])
player.pop(0)