Bug in random number generation
Open
Beginner friendly
bug
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Description: We have to generate random number between 0 and 3 to select anyone from 4 colors in nextSequence function. But the code now generate any number. Figure out how to generate the number in specific range only.
Contributor guide
No contributing guide indexed for this repository
Research direction
Look for the nextSequence function in the codebase, likely in a game or utility file. Examine the current random number generation logic, which probably uses Math.random() without proper bounds. Adjust it to produce integers from 0 to 3 inclusive, then test by running the function multiple times to verify the output range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100