我正在尝试制作卡片交易计划。
功能:
def deal_cards(FIVE,card_list):
card_list = = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] * 4
hand_one = []
hand_two = []
hand_three = []
hand_four = []
hand_five = []
for i in card_list:
hand_one = card_list.append(i)
hand_two = card_list.pop(i + 1)
hand_three = card_list.pop(i + 2)
hand_four = card_list.pop(i + 3)
hand_five = card_list.pop(i + 4)
return hand_one, hand_two, hand_three, hand_four, hand_five
主:
print("Deck - ", end="")
print(*card_list)
hand_one, hand_two, hand_three, hand_four, hand_five = deal_cards(card_list)
print("Player 1 - ", end="")
print(*hand_one)
print("Player 2 - ", end="")
print(*hand_two)
print("Player 3 - ", end="")
print(*hand_three)
print("Player 4 - ", end="")
print(*hand_four)
print("Player 5 - ", end="")
print(*hand_five)
答案 0 :(得分:0)
我以前用过这个:
<DataGridTemplateColumn Header="ATTENDEES" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ItemsControl ItemsSource="{Binding Path=attendees}" x:Name="AttendeesItemsControl"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>