add some sanity checks

This commit is contained in:
2020-06-16 20:09:06 +02:00
parent f583957aa9
commit f6153a7f54
2 changed files with 7 additions and 0 deletions

View File

@@ -170,6 +170,10 @@ class EventSeries():
elif type(e) == MapInformationEvent:
self.map = e.map
### check if there are players in both teams ###
if not self.winnerTeam or not self.loserTeam:
raise ValueError("One of the teams was empty")
### normalize teamchanges
toBeRemovedFromLosers = [] # cannot change iteable during iteration
toBeRemovedFromWinners = []