/* Generate boards for the InversionSwap game. The first two arguments are the lowest and highest values allowed in the game, and the third is the length of the desired list. */ public class InversionSwapGenerator { public static void main( String[] args ) { int low = Integer.parseInt( args[0] ); int high = Integer.parseInt( args[1] ); int size = Integer.parseInt( args[2] ); int range = high - low + 1; for (int i = 0; i < size; i++) { System.out.print( (int) (range * Math.random()) + low ); System.out.print( " " ); } System.out.println(); } }