public static int[] shuffle(int[] input){
  List<Integer> vals=new ArrayList<Integer>(input.length);
  for (int i=0; i < input.length; i++)   vals.add(input[i]);
  Collections.shuffle(vals,SEEDED_RANDOM);
  int[] copy=new int[input.length];
  for (int i=0; i < input.length; i++)   copy[i]=vals.get(i);
  return copy;
}

public static int [ ] shuffle ( int [ ] input ) { List < Integer > vals = new ArrayList < Integer > ( input . length ) ; for ( int i = 0 ; i < input . length ; i ++ ) vals . add ( input [ i ] ) ; Collections . shuffle ( vals , SEEDED_RANDOM ) ; int [ ] copy = new int [ input . length ] ; for ( int i = 0 ; i < input . length ; i ++ ) copy [ i ] = vals . get ( i ) ; return copy ; }
weirdly java doesn ' t seem to have arrays . shuffle ( ) , this terrible hack does that .
