Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int randomNums()
- {
- int result = 0;
- int chance = (int) (Math.random() * 100);
- if(chance <= 50) {
- result = 50;
- } else if (chance >= 51 && chance <= 75) {
- result = 25
- } else if (chance >= 76 && chance <= 95) {
- result = 20;
- } else {
- result = 5;
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement