Let's say I'm writing a simple luck game - each player presses Enter and the game assign him a random number between 1-6. Just like a cube. At the end of the game, the player with the highest number wins.
Now, let's say I'm a cheater. I want to write the game so player #1 (which will be me) has a probability of 90% to get six, and 2% to get each of the rest numbers (1, 2, 3, 4, 5).
So, how can I generate a number random, and set the probability for each number?
Thanks.