From 5b29110cbe6eb2f25924db78e8b1d2e2bafd036c Mon Sep 17 00:00:00 2001 From: Ethan Davidson <31261035+EthanThatOneKid@users.noreply.github.com> Date: Sat, 6 Jan 2024 23:11:47 -0800 Subject: [PATCH] the Nate factor https://discord.com/channels/710225099923521558/802314440602943518/1193447398744277012 --- lib/leaderboard/scores.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/leaderboard/scores.ts b/lib/leaderboard/scores.ts index 20c1a87..3a86483 100644 --- a/lib/leaderboard/scores.ts +++ b/lib/leaderboard/scores.ts @@ -52,7 +52,7 @@ export function calculateSubmissionScore( const questionDate = new Date(`${question.date} GMT`); const submissionDate = new Date(submission.date); const msElapsed = submissionDate.getTime() - questionDate.getTime(); - const ratio = Math.min(Math.max(msElapsed / options.duration, 0), 1); + const ratio = 1 - Math.min(Math.max(msElapsed / options.duration, 0), 1); const score = ((options.possibleHighestScore - options.possibleLowestScore) * ratio) + options.possibleLowestScore; if (!options.modifyScore) {