Skip to content

Commit

Permalink
Add -1 because the value of activePlayer var is 1 and 2 not 0 and 1
Browse files Browse the repository at this point in the history
  • Loading branch information
kenvilar committed Dec 3, 2017
1 parent 051d079 commit 84a037f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ document.querySelector('.btn-roll-dice').addEventListener('click', function () {

document.querySelector('.btn-hold').addEventListener('click', function () {
//Add player current rolled score to his/her main score
scores[activePlayer] = scores[activePlayer] = rolledScore;
scores[activePlayer - 1] = scores[activePlayer - 1] = rolledScore;
});


Expand Down

0 comments on commit 84a037f

Please sign in to comment.