public static int getRange(int min, int max) {
        if (random == null) {
            init();
        }

        if (max < min) {
            return 0;
        }

        int range = max - min + 1;
        
        if(range == 1) {
            return min;
        } else if (range <= 0) {
            return 0;
        }

        return random.nextInt(range) + min;
    }