Esempio n. 1
0
  public static void main(String[] args) {
    if (args.length != 1) {
      printHelp();
      return;
    }
    if (args[0] == "-h" || args[0] == "--help") {
      printHelp();
      return;
    }
    try {
      Labyrinth labyrinth = new Labyrinth(args[0]);
      System.out.println(
          "Labyrinth width: " + labyrinth.getWidth() + " height: " + labyrinth.getHeight());
      JFrame f = new JFrame();
      f.add(labyrinth);
      f.pack();
      f.setVisible(true);

    } catch (Exception e) {
      System.out.println(e);
    }
  }