Skip to content

Commit

Permalink
Simple one line
Browse files Browse the repository at this point in the history
  • Loading branch information
kenvilar committed Dec 3, 2017
1 parent 234f6ea commit b4c6926
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ function nextPlayer() {

// The player looses his/her rolled scores if one of your two dices (or both of them) rolled two 6 in a row.
// Then it's the next player's turn
lastRolledDice1 = 0;
lastRolledDice2 = 0;
lastRolledDice1 = lastRolledDice2 = 0;

activePlayer === 1 ? activePlayer = 2 : activePlayer = 1;

Expand All @@ -110,8 +109,7 @@ function reset() {

// The player looses his/her rolled scores if one of your two dices (or both of them) rolled two 6 in a row.
// Then it's the next player's turn
lastRolledDice1 = 0;
lastRolledDice2 = 0;
lastRolledDice1 = lastRolledDice2 = 0;

document.querySelector('#name-1').textContent = 'PLAYER 1';
document.querySelector('#name-2').textContent = 'PLAYER 2';
Expand Down

0 comments on commit b4c6926

Please sign in to comment.