mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-06 07:01:36 +01:00
Merge branch 'master' of github.com:FAUSheppy/open-web-leaderboard
This commit is contained in:
12
Round.py
12
Round.py
@@ -12,8 +12,9 @@ class Round:
|
||||
losersParsed = json.loads(losers)
|
||||
|
||||
self.startTime = startTime
|
||||
self.winners = [ player.playerFromDict(wp) for wp in winnersParsed ]
|
||||
self.losers = [ player.playerFromDict(lp) for lp in losersParsed ]
|
||||
self.id = int(float(timestamp))
|
||||
self.winners = [ player.playerFromDict(wp, int(duration)) for wp in winnersParsed ]
|
||||
self.losers = [ player.playerFromDict(lp, int(duration)) for lp in losersParsed ]
|
||||
self.winnerSide = winnerSide
|
||||
self.duration = datetime.timedelta(seconds=int(duration))
|
||||
|
||||
@@ -28,9 +29,12 @@ class Round:
|
||||
else:
|
||||
self.mapName = "unavailiable"
|
||||
|
||||
self.confidence = int(confidence * 100)
|
||||
self.numericPrediction = prediction
|
||||
if prediction == 0:
|
||||
self.confidence = (int(confidence * 100) - 50)*2
|
||||
self.quality = int(150 - self.confidence)
|
||||
if self.confidence < 50:
|
||||
self.prediction = "-"
|
||||
elif prediction == 0:
|
||||
self.prediction = self.winnerSideString
|
||||
elif prediction == 1:
|
||||
self.prediction = self.loserSideString
|
||||
|
||||
Reference in New Issue
Block a user