File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ def process(self, replay):
162162#####################################################
163163
164164class ResultsProcessor (Processor ):
165+ def _process_results (self , replay ):
166+ #Knowing the team results, map results to the players as well
167+ for player in replay .players :
168+ player .result = replay .results [player .team ]
169+
165170 def process (self , replay ):
166171 # Check if replay file has recorded the winner
167172 remaining = set ()
@@ -173,8 +178,9 @@ def process(self, replay):
173178 else :
174179 remaining .add (player .team )
175180 if len (remaining ) == 0 :
181+ self ._process_results (replay )
176182 return replay
177-
183+
178184 #Remove players from the teams as they drop out of the game
179185 print replay .teams
180186 print replay .players
@@ -229,8 +235,6 @@ def process(self, replay):
229235 for team in remaining :
230236 replay .results [team ] = "Unknown"
231237
232- #Knowing the team results, map results to the players as well
233- for player in replay .players :
234- player .result = replay .results [player .team ]
238+ self ._process_results (replay )
235239
236240 return replay
You can’t perform that action at this time.
0 commit comments