diff --git a/pysollib/game.py b/pysollib/game.py index 04de0b3d..3a570cf3 100644 --- a/pysollib/game.py +++ b/pysollib/game.py @@ -1979,10 +1979,8 @@ Congratulations, you did it ! def isGameWon(self): # default: all Foundations must be filled - c = 0 - for s in self.s.foundations: - c += len(s.cards) - return c == len(self.cards) + return sum([len(s.cards) for s in self.s.foundations]) == \ + len(self.cards) def getFoundationDir(self): for s in self.s.foundations: