Skip to content

Commit

Permalink
leaderboard: also round graphs the same way
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiq0 committed Jan 11, 2025
1 parent 44ade2c commit 1a01567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/proboj/games/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ def get_scores_and_timestamps(game, bots, scale=True):
timestamps.append(match.finished_at.strftime("%Y-%m-%d %H:%M:%S.%f"))
for bot in bots:
if scale:
total_score[bot.id] = round(total_score[bot.id] * 0.999)
total_score[bot.id] = total_score[bot.id] * 0.999
datapoints[bot.id].append(total_score[bot.id])

for bot in match.matchbot_set.all():
if not bot.score:
continue
bot_id = bot.bot_version.bot_id
total_score[bot_id] += bot.score
datapoints[bot_id][-1] = total_score[bot_id]
datapoints[bot_id][-1] = round(total_score[bot_id])
return datapoints, timestamps


Expand Down

0 comments on commit 1a01567

Please sign in to comment.