diff --git a/pysollib/games/auldlangsyne.py b/pysollib/games/auldlangsyne.py index 7c338650..99d76b45 100644 --- a/pysollib/games/auldlangsyne.py +++ b/pysollib/games/auldlangsyne.py @@ -606,7 +606,7 @@ class Formic(TamOShanter): cards.remove(c) if len(suits) == 4: break - top_cards.sort(key=lambda x: x.suit) # sort by suit + top_cards.sort(key=lambda x: -x.suit) # sort by suit return cards+top_cards def startGame(self): diff --git a/pysollib/games/calculation.py b/pysollib/games/calculation.py index 78aef8f6..07283345 100644 --- a/pysollib/games/calculation.py +++ b/pysollib/games/calculation.py @@ -406,7 +406,7 @@ class SeniorWrangler(Game): ranks.append(c.rank) cards.remove(c) top.append(c) - top.sort(key=lambda x: x.rank) + top.sort(key=lambda x: -x.rank) return cards+top def startGame(self): @@ -470,7 +470,7 @@ class SPatience(Game): ranks.append(c.rank) cards.remove(c) top.append(c) - top.sort(key=lambda x: x.rank) + top.sort(key=lambda x: -x.rank) return cards+top[7:]+top[:7] def startGame(self): diff --git a/pysollib/games/grandfathersclock.py b/pysollib/games/grandfathersclock.py index 68529279..4b366d1f 100644 --- a/pysollib/games/grandfathersclock.py +++ b/pysollib/games/grandfathersclock.py @@ -122,7 +122,7 @@ class GrandfathersClock(Game): clocks.append(c) cards.remove(c) # sort clocks reverse by rank - clocks.sort(key=lambda x: x.rank) + clocks.sort(key=lambda x: -x.rank) return clocks + cards def startGame(self): @@ -471,7 +471,7 @@ class BigBen(Game): if not t: break # sort clocks reverse by rank - clocks.sort(key=lambda x: x.rank) + clocks.sort(key=lambda x: -x.rank) return cards+clocks def startGame(self): diff --git a/pysollib/games/picturegallery.py b/pysollib/games/picturegallery.py index 18ce62b9..3edee789 100644 --- a/pysollib/games/picturegallery.py +++ b/pysollib/games/picturegallery.py @@ -553,7 +553,7 @@ class VirginiaReel(RoyalParade): bottom_cards.append(c) if len(ranks) == 3: break - bottom_cards = sorted(bottom_cards, key=lambda x: x.rank)[::-1] + bottom_cards.sort(key=lambda x: -x.rank) return cards+bottom_cards def startGame(self): diff --git a/scripts/all_games.py b/scripts/all_games.py index b87cad2f..71c3e233 100755 --- a/scripts/all_games.py +++ b/scripts/all_games.py @@ -92,6 +92,7 @@ def by_category(): games_by_cat[gt] = 1 games_by_cat_list = [(i, j) for i, j in games_by_cat.items()] games_by_cat_list.sort(key=lambda x: x[1]) + games_by_cat_list = games_by_cat_list[::-1] # print '
Name | Number |
---|---|
%s | %s |