We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7654702 commit bd933d5Copy full SHA for bd933d5
sc2reader/processors.py
@@ -163,6 +163,18 @@ def process(self, replay):
163
164
class ResultsProcessor(Processor):
165
def process(self, replay):
166
+ # Check if replay file has recorded the winner
167
+ remaining = set()
168
+ for player in replay.players:
169
+ if player.outcome == 1:
170
+ replay.results[player.team] = "Won"
171
+ elif player.outcome == 2:
172
+ replay.results[player.team] = "Lost"
173
+ else:
174
+ remaining.add(player.team)
175
+ if len(remaining) == 0:
176
+ return replay
177
+
178
#Remove players from the teams as they drop out of the game
179
print replay.teams
180
print replay.players
0 commit comments