public static int randomNumberBetween(double begin, double end) {
        if (begin > end)
            throw new IllegalArgumentException("Begin must not be less than end");
        return (int) begin + (int) (Math.random() * ((end - begin) + 1));
    }