Let's work to help developers, not make them feel stupid. Well, for an American Roulette wheel, you're going to need to generate a random integer between 1 and Already have an account?onlinelighting.com.au coupon LEARN ROULETTE The code is meant to select a random element, but with probabilities according to a certain weight. Example: We want to select from a. Here is some Java code that implements roulette wheel selection. Assume you have . It's C# code, but enjoy the C like speed and simplicity! Lots of correct solutions already, but I think this code is clearer. This is called roulette-wheel selection via stochastic acceptance: . Based on my research,Here is another implementation in C# if there is a need for it: //those.