# Review Algorithmic Thinking by Building a Dice Game - Step 12

### Tell us what’s happening:

It keeps telling me to set the rolls and score variable to 0 and the round to 1 which i have done. could i be missing something

``````<!-- file: index.html -->

``````
``````/* file: styles.css */

``````
``````/* file: script.js */
// User Editable Region

const resetGame = () => {
listofAllDice.forEach((el) => {
el.textContent = 0
})
score = 0;
rolls = 0;
round = 1;

totalScore.textContent = `\${score}`;
scoreHistory.innerHTML = ``;
currentRoundRolls.textContent = `\${rolls}`;
currentRoundRound.textContent = `\${round}`;

}

if (rolls === 3) {
} else {
rolls++;
rollDice();
getHighestDuplicates(diceValuesArr);
}
});

isModalShowing = !isModalShowing;

if (isModalShowing) {
rulesBtn.textContent = "Hide rules";
rulesContainer.style.display = "block";
} else {
rulesBtn.textContent = "Show rules";
rulesContainer.style.display = "none";
}
});

let selectedValue;
let achieved;

for (const radioButton of scoreInputs) {
break;
}
}

if (selectedValue) {
rolls = 0;
round++;
if (round > 6) {
setTimeout(() => {
}, 500);
resetGame();
}
} else {
}
});

// User Editable Region
``````

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36`

### Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 12

I later tried to rewrite the code and ended with this as the correct answer

``````score = 0;
round = 1;
rolls = 0;

listOfAllDice.forEach(die => {die.textContent= `0`})
``````

which is less than what was instructed and very similar to what i had earlier but without the rest of the code from the earlier and i hadn’t even called the function yet as instructed. I don’t know if this was a bug or not

thanks for reporting this. I’ve opened a github issue to alert the developers.

My pleasure to be of help to the community

1 Like