diff --git a/src/state/index.js b/src/state/index.js index 00357b4..32c8482 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -367,7 +367,9 @@ AFRAME.registerState({ victory: function (state) { state.isVictory = true; - const accuracy = state.beatsHit / (state.beatsMissed + state.beatsHit); + const accuracy = + state.score.beatsHit / + (state.score.beatsMissed + state.score.beatsHit); state.score.accuracy = accuracy; state.score.accuracyText = `${(accuracy * 100).toFixed()}%`;