Round.get_winner_summary added

This commit is contained in:
Jakub Senderák
2020-03-28 07:22:52 +01:00
parent ada5d74fd4
commit 07a494a40b
2 changed files with 48 additions and 0 deletions
+7
View File
@@ -170,6 +170,13 @@ class Round():
def is_guessing_completed(self):
return len(self.guesses) == 4
def get_winner_summary(self) -> []:
summary = [0]*4
for stash in self.stashes:
if stash.is_completed():
summary[stash.get_winner()] += 1
return summary
def get_last_stash(self):
return self.stashes[-1] if self.stashes else None