import java.io.BufferedReader; /** sample test driver for Project 3 Warm-up **/ public class MapMaker { /** If run from the command line (or from Bluej right-click), * a file name string may be entered. * It is probably simpler to ignore this at first, and * use a randomly generated Reader */ public static void main(String[] args) { if (args.length > 1) { System.out.println("MapMaker: argument string was " + args + "\ncorrect usage is either no argument, " + " or one argument (a file path)."); return; } BufferedReader bR = null; if (args.length == 1) { //the argument should be a file path try { bR = MapReaderFactory.createMapReader(args[0]); } catch (Exception e) { System.out.println("\nCouldn't open file " + args[0]); } } if (bR == null) { System.out.println("A random map will be generated."); //in the following, the parameter is the number of edges of the map. bR = MapReaderFactory.createMapReader(60); //try different numbers } assert bR != null; //So... you now have a Reader with a map waiting to be read //what do you do with it???? drawGUI GUI = new drawGUI(); GUI.show(); //main exits, but the GUI thread continues to execute } //end main } //end class MapMaker