diff --git a/squarenotsquare/src/libs/CalculateScore.js b/squarenotsquare/src/libs/CalculateScore.js index 0dfc6c0..c3658ae 100644 --- a/squarenotsquare/src/libs/CalculateScore.js +++ b/squarenotsquare/src/libs/CalculateScore.js @@ -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;