mirror of
https://github.com/FAUSheppy/skillbird
synced 2025-12-06 06:51:34 +01:00
check for missing winner-event
This commit is contained in:
@@ -185,6 +185,10 @@ class EventSeries():
|
||||
elif type(e) == MapInformationEvent:
|
||||
self.map = e.map
|
||||
|
||||
### check if we had a winner event ###
|
||||
if self.winnerTeamId < 2:
|
||||
raise ValueError("Winner event not present or faulty.")
|
||||
|
||||
### check if there are players in both teams ###
|
||||
if not self.winnerTeam or not self.loserTeam:
|
||||
raise ValueError("One of the teams was empty")
|
||||
|
||||
Reference in New Issue
Block a user