public static void main(String[] args)
      throws FileNotFoundException, IOException, InterruptedException {
    CommonConstants.ENABLE_CONSOLE_LOGGING = true;

    OptionableProperties options = MainUtils.loadOptions(args);
    SwingManagedJSettlers.loadOptionalSettings(options);
    SwingResourceLoader.setupResourcesManager(
        SwingManagedJSettlers.getConfigFile(options, "config.prp"));

    int targetGameTimeMinutes = Integer.valueOf(options.getProperty("targetTime")) * 60 * 1000;

    String replayFileString = options.getProperty("replayFile");
    if (replayFileString == null)
      throw new IllegalArgumentException(
          "Replay file needs to be specified with --replayFile=<FILE>");
    File replayFile = new File(replayFileString);
    if (!replayFile.exists())
      throw new FileNotFoundException(
          "Found replayFile parameter, but file can not be found: " + replayFile);

    ReplayTool.replayAndCreateSavegame(replayFile, targetGameTimeMinutes, "replayForSavegame.log");

    Thread.sleep(2000);
    System.exit(0);
  }
Exemplo n.º 2
0
 public static void main(String[] args) throws FileNotFoundException, IOException {
   SwingManagedJSettlers.setupResourceManagers(MainUtils.createArgumentsMap(args), "config.prp");
   new MapCreatorApp();
 }