If you start out with a specific range size (10-20 for 10 total numbers) and then generate a few (say 5) random numbers, and then change the range, if the new range is 5 or less, the program will fail to generate any new numbers.
This occurs even if the range is separate from the previous range (Aka, doing range 10-20 and then 30-35). This is caused because the code simply checks if the number of previously picked items are greater then the range, instead of validating it.
If you start out with a specific range size (10-20 for 10 total numbers) and then generate a few (say 5) random numbers, and then change the range, if the new range is 5 or less, the program will fail to generate any new numbers.
This occurs even if the range is separate from the previous range (Aka, doing range 10-20 and then 30-35). This is caused because the code simply checks if the number of previously picked items are greater then the range, instead of validating it.