I made a different version of the function choose:
def choose(cards):
'It chooses among cards, little cards first, then little briscole, then big cards'
cardschoice = []
for c in cards:
card_color = c[-1]
briscola_color = briscola[0][-1]
match = card_color == briscola_color
if not match:
cardschoice += [c]
number = len(cardschoice)
return cardschoice
cardsToChoose = choose(pc1)
print("Choose among: ",cardsToChoose)
This function returns a list of the cards without the briscole...
It could be helpful...
In the next post we will give a value, according to the rule of the game, to each card.
Comments
Post a Comment