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

### Tell us what’s happening:

I have done all the stuff but I don’t know what is the error.

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

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

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

const resetGame = () => {
// Reset dice values array to all zeros
diceValuesArr = [0, 0, 0, 0, 0];

// Reset game state variables
score = 0;
totalScore = 0; // This line should be present if totalScore is a variable being reset
rolls = 0;
round = 1;

// Reset the displayed text for all dice elements
listOfAllDice.forEach((dice, index) => {
dice.textContent = diceValuesArr[index];
});

// Update the displayed total score
totalScoreText.textContent = totalScore;

// Clear the score history
scoreHistory.innerHTML = "";

// Update the displayed number of rolls and current round
currentRoundRollsText.textContent = rolls;
currentRoundText.textContent = round;

// Call the function to reset radio options
};

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(() => {
resetGame();
}, 500);

}
} else {
}
});

// User Editable Region
``````

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

### Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 12

As you set `score` to `0`, you can assign it to anything to also change the value.

Check the names of these variables.

Happy coding

• simply focus on this bit, you may need to rewrite “listOfAllDice” forEach loop, hint: make use of “textContent” for each node
• remove all else
happy coding