mirror of
https://github.com/FAUSheppy/skillbird
synced 2025-12-06 06:51:34 +01:00
Merge branch 'master' of gitlab.com:Sheppy_/skillbird
This commit is contained in:
@@ -16,6 +16,9 @@ class Round:
|
|||||||
|
|
||||||
def __init__(self, winnerTeam, loserTeam, _map, duration, startTime, winnerSide):
|
def __init__(self, winnerTeam, loserTeam, _map, duration, startTime, winnerSide):
|
||||||
|
|
||||||
|
if duration <= 0:
|
||||||
|
raise ValueError("Duration cannot be zero")
|
||||||
|
|
||||||
self.winners = winnerTeam
|
self.winners = winnerTeam
|
||||||
self.losers = loserTeam
|
self.losers = loserTeam
|
||||||
self.winnerSide = winnerSide
|
self.winnerSide = winnerSide
|
||||||
|
|||||||
@@ -170,6 +170,10 @@ class EventSeries():
|
|||||||
elif type(e) == MapInformationEvent:
|
elif type(e) == MapInformationEvent:
|
||||||
self.map = e.map
|
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
|
### normalize teamchanges
|
||||||
toBeRemovedFromLosers = [] # cannot change iteable during iteration
|
toBeRemovedFromLosers = [] # cannot change iteable during iteration
|
||||||
toBeRemovedFromWinners = []
|
toBeRemovedFromWinners = []
|
||||||
|
|||||||
Reference in New Issue
Block a user