From a94a91630a8aadf9441c8ceac395427b26e8147c Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Mon, 3 Dec 2018 16:35:36 -0800 Subject: [PATCH] multiply score.accuracy by 100 --- src/state/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/state/index.js b/src/state/index.js index 6731dbc..9783c1a 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -449,7 +449,8 @@ AFRAME.registerState({ state.isVictory = true; // Percentage is score divided by total possible score. - const accuracy = state.score / (state.score.beatsMissed + state.score.beatsHit) * 110; + const totalBeats = state.score.beatsMissed + state.score.beatsHit; + const accuracy = (state.score / (totalBeats * 110)) * 100; state.score.accuracy = accuracy; if (accuracy === 1) {