Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.

Commit 1a74224

Browse files
committed
score is a int
1 parent 12325ae commit 1a74224

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sc_client/game.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def update(self, element):
4242
self.last_move = Move.from_xml(last_move, self)
4343

4444
for entry in element.findall('state/ambers/entry'):
45-
self.ambers[Team[entry.find('team').text]] = int(entry.find('int').text)
45+
self.ambers[Team[entry.find('team').text]] = int(
46+
entry.find('int').text)
4647
elif element.get('class') == 'welcomeMessage':
4748
self.team = Team[element.get('color')]
4849
self.setup(self)
@@ -151,9 +152,8 @@ def from_xml(cls, element: ET.Element):
151152
scores = {}
152153
regular = True
153154
for entry in element.findall('scores/entry'):
154-
team = Team[entry.find('player').get('team')]
155-
score = entry.find('score/part[%s]' % score_index)
156-
scores[team] = score
155+
scores[Team[entry.find('player').get('team')]] = int(
156+
entry.find('score/part[%s]' % score_index).text)
157157

158158
regular = regular and entry.find('score').get('cause') == 'REGULAR'
159159

0 commit comments

Comments
 (0)