my test are working but everytime i submit i get warnings. i updated my updateRadipOption(5,0) for every time i click the button
here are the warnings:
If a small straight is rolled, your checkForStraights function should enable the fourth radio button, set the value to 30, and update the displayed text to , score = 30.
If a large straight is rolled, your checkForStraights function should enable the fifth radio button, set the value to 40, and update the displayed text to , score = 0. ------- is this correct? 0?
If a large straight is rolled, your checkForStraights function should also enable the fourth radio button, set the value to 30, and update the displayed text to , score = 30. ### Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
if (increment === 5){
console.log('large');
updateRadioOption(4, 40);
updateRadioOption(3, 30);
}
if (increment === 4){
console.log('small');
updateRadioOption(3, 30);
}
updateRadioOption(5, 0);
}
rollDiceBtn.addEventListener("click", () => {
if (rolls === 3) {
alert("You have made three rolls this round. Please select a score.");
} else {
rolls++;
resetRadioOptions();
// diceValuesArr = [1,2,3,4,5];
rollDice();
updateStats();
getHighestDuplicates(diceValuesArr);
detectFullHouse(diceValuesArr);
checkForStraights(diceValuesArr);
}
});
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 14
Here’s how I tested your code: checkForStraights([1,5,4,2,3]);
I replaced the call for checkForStraights with this hardcoded array. This array is a large straight as it has the numbers 1,2,3,4,5. Then I clicked the roll button but your function failed to enable the required radio options.
so it doesn’t have to be consecutive (exactly as it appears in the original array). that means i have to sort the array first then do the increment function. thank you i’ll rework my code.
If a large straight is rolled, your checkForStraights function should enable the fifth radio button, set the value to 40, and update the displayed text to , score = 0. ------- is this correct? 0?
Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.