Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Random system class
- Random ran = new Random();
- // Array of ranges to enter for random max index
- int[] ListOfMaxRanges = new int[] {5,5,5,5,5,5,5,5,5,5,10,10,10,10,20,20,20,50,50,100};
- // get a random MaxIndex number from the array ListOfMaxRanges
- int MaxRange = ListOfMaxRanges[ran.Next(ListOfMaxRanges.Length)];
- // Insert my max range to get final number
- int MyWeighedRandomNumber = ran.Next(MaxRange);
Advertisement
Add Comment
Please, Sign In to add comment