freeCodeCamp: Dice Game - Missing some small straights
Describe the Issue
You can get a small straight with "12346" but that’s excluded.
Affected Page
Your code
  if (smallStraightsArr.some(straight => uniqueNumbersStr.includes(straight))) {
    updateRadioOption(3, 30);
  }
Expected behavior
All valid small straights captured.
We should put Step 85 before the current Step 84, then update Step 84 to use something like the logic given above.
Forum Post
System
All
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 19 (19 by maintainers)
Step 85’s current code is simpler than Step 84 needs to be. I think its better to introduce a simpler case of an idea first.
Though if we change the
smallStraightsArrarray tosmallStraightsArrWithAllPossibleExtraDieValues, then the logic would be the same… but I still don’t love that approach.