Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.util.Random;
- public class RandomHelper {
- public static boolean getBigChance(){
- Random random = new Random();
- boolean value = (random.nextDouble()<0.9);
- return value;
- }
- public static boolean get50Chance(){
- Random random = new Random();
- boolean value = (random.nextDouble()<0.5);
- return value;
- }
- public static int getInt(int lower, int upper){
- Random random = new Random();
- int value = lower + random.nextInt(upper);
- return value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement