1 changed files with 5 additions and 0 deletions
@ -1,5 +1,10 @@ |
|||
export function calculateSquareScore (answers, finalTime) { |
|||
let timeScore = Math.round((60 - finalTime) * 1000); |
|||
|
|||
if (timeScore < 0) { |
|||
timeScore = 0; |
|||
} |
|||
|
|||
let answerScore = answers * 1000; |
|||
let finalScore = timeScore + answerScore; |
|||
return finalScore; |
|||
|
Loading…
Reference in new issue