This question already has an answer here:
- Make a fake random distribution? 7 answers
Sorry my terminology is somewhat limited so I'll have to use more words to explain what I mean.
In games that require critical hits, I've heard it's not good to generate a random number but instead one should randomly pick a number from a list of possibilities then exclude that number from the next picking. This way, the dev is given more control over the player's experience.
To do this, I've been thinking somewhere along the lines of generating a random number then excluding that number from the next generation. In C#, how can I exclude a number from a random number generation? I don't think that using a while loop to continually check for another number if the currently generated one is excluded is a very efficient method, especially when most of the numbers have been excluded. Is there a built-in method to do this or some clever way to implement it?
Not: I need upwards of 100 numbers to possibly generate so hard-coding it would be tedious.