src/main/java/org/teachingextensions/logo/utils/MazeUtils/StdRandom.java
public static int uniform(int a, int b)
  {
    if (b <= a)
      throw new IllegalArgumentException("Invalid range");
    if ((long) b - a >= Integer.MAX_VALUE)
      throw new IllegalArgumentException("Invalid range");
    return a + uniform(b - a);
  }
public static int uniform(int a, int b)
  {
    if (b <= a)
      throw new IllegalArgumentException("Invalid range");
    if ((long) b - a >= Integer.MAX_VALUE)
      throw new IllegalArgumentException("Invalid range");
    return a + uniform(b - a);
  }
public static int uniform ( int a , int b ) { if ( b <= a ) throw new IllegalArgumentException ( "Invalid range" ) ; if ( ( long ) b - a >= Integer . MAX_VALUE ) throw new IllegalArgumentException ( "Invalid range" ) ; return a + uniform ( b - a ) ; }
Returns a random integer uniformly in [a, b).

@param  a the left endpoint
@param  b the right endpoint
@return a random integer uniformly in [a, b)
@throws IllegalArgumentException if <tt>b <= a</tt>
@throws IllegalArgumentException if <tt>b - a >= Integer.MAX_VALUE</tt>
Returns a random integer uniformly in [ a b ) .