Skip to content

Commit aaf3d6d

Browse files
committed
Removed winner_known flag and added winner=None feature to replay.py
1 parent 2b62867 commit aaf3d6d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

sc2reader/replay.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,8 @@ class Replay(object):
8787
#: A reference to the :class:`Person` that recorded the game
8888
recorder = None
8989

90-
#: A flag indicating whether all the results are known or not
91-
winner_known = bool()
92-
9390
#: If the winner_known flag is set this will contain the winning team
94-
winner = object()
91+
winner = None
9592

9693
def __init__(self, replay_file, **options):
9794
self.opt = utils.AttributeDict(options)
@@ -131,7 +128,6 @@ def __init__(self, replay_file, **options):
131128
self.attributes = list()
132129
self.messages = list()
133130
self.recorder = None # Player object
134-
self.winner_known = False
135131
self.packets = list()
136132

137133
self.objects = {}
@@ -247,7 +243,6 @@ def load_players(self):
247243
# Do basic win/loss processing from details data
248244
if pdata.result == 1:
249245
player.team.result = "Win"
250-
self.winner_known = True
251246
self.winner = player.team
252247
elif pdata.result == 2:
253248
player.team.result = "Loss"

0 commit comments

Comments
 (0)