diff sat_frontends/tools/games.py @ 2624:56f94936df1e

code style reformatting using black
author Goffi <goffi@goffi.org>
date Wed, 27 Jun 2018 20:14:46 +0200
parents 26edcf3a30eb
children 003b8b4b56a7
line wrap: on
line diff
--- a/sat_frontends/tools/games.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat_frontends/tools/games.py	Wed Jun 27 20:14:46 2018 +0200
@@ -19,7 +19,13 @@
 
 """This library help manage general games (e.g. card games) and it is shared by the frontends"""
 
-SUITS_ORDER = ['pique', 'coeur', 'trefle', 'carreau', 'atout']  # I have switched the usual order 'trefle' and 'carreau' because card are more easy to see if suit colour change (black, red, black, red)
+SUITS_ORDER = [
+    "pique",
+    "coeur",
+    "trefle",
+    "carreau",
+    "atout",
+]  # I have switched the usual order 'trefle' and 'carreau' because card are more easy to see if suit colour change (black, red, black, red)
 VALUES_ORDER = [str(i) for i in xrange(1, 11)] + ["valet", "cavalier", "dame", "roi"]
 
 
@@ -58,12 +64,12 @@
             idx1 = SUITS_ORDER.index(self.suit)
             idx2 = SUITS_ORDER.index(other.suit)
             return idx1.__cmp__(idx2)
-        if self.suit == 'atout':
-            if self.value == other.value == 'excuse':
+        if self.suit == "atout":
+            if self.value == other.value == "excuse":
                 return 0
-            if self.value == 'excuse':
+            if self.value == "excuse":
                 return -1
-            if other.value == 'excuse':
+            if other.value == "excuse":
                 return 1
             return int(self.value).__cmp__(int(other.value))
         # at this point we have the same suit which is not 'atout'