mirror of
https://github.com/FAUSheppy/skillbird
synced 2025-12-07 15:21:35 +01:00
raise value error if round was too short
This commit is contained in:
@@ -19,6 +19,8 @@ class Round:
|
|||||||
|
|
||||||
if duration <= dt.timedelta(0):
|
if duration <= dt.timedelta(0):
|
||||||
raise ValueError("Duration cannot be zero")
|
raise ValueError("Duration cannot be zero")
|
||||||
|
if duration <= dt.timedelta(seconds=120):
|
||||||
|
raise ValueError("Games was too short")
|
||||||
|
|
||||||
self.winners = winnerTeam
|
self.winners = winnerTeam
|
||||||
self.losers = loserTeam
|
self.losers = loserTeam
|
||||||
|
|||||||
Reference in New Issue
Block a user