title: Probability Random Number Generator
body: <p>Let's say I'm writing a simple luck game - each player presses Enter and the game assigns him a random number between 1-6. Just like a cube. At the end of the game, the player with the highest number wins.</p>
  
  <p>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).</p>
  
  <p>How can I generate a number random, and set the probability for each number? </p>