Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue