Reformatted code base using black.

This commit is contained in:
Goffi 2024-06-19 18:44:57 +02:00
commit 53fdaa9d09

View file

@ -141,7 +141,12 @@ class Tarot(object):
for value in ["excuse"] + list(map(str, list(range(1, 22)))):
self.deck_ordered.append(TarotCard(("atout", value)))
for suit in ["pique", "coeur", "carreau", "trefle"]:
for value in list(map(str, list(range(1, 11)))) + ["valet", "cavalier", "dame", "roi"]:
for value in list(map(str, list(range(1, 11)))) + [
"valet",
"cavalier",
"dame",
"roi",
]:
self.deck_ordered.append(TarotCard((suit, value)))
self.__choose_contrat_id = host.register_callback(
self._contrat_choosed, with_data=True
@ -474,9 +479,7 @@ class Tarot(object):
if played_card.suit == "atout" and played_card > biggest_atout:
biggest_atout = played_card
idx = (idx + 1) % len(players)
has_suit = (
False
) # True if there is one card of the asked suit in the hand of the player
has_suit = False # True if there is one card of the asked suit in the hand of the player
has_atout = False
biggest_hand_atout = None
@ -608,7 +611,7 @@ class Tarot(object):
hand[players[i]] = deck[0:hand_size]
del deck[0:hand_size]
chien.extend(deck)
del (deck[:])
del deck[:]
msg_elts = {}
for player in players:
msg_elts[player] = self.__card_list_to_xml(hand[player], "hand")