"config:",
"help",
"log",
"version"
};
Options opt = Options.parse(args, options);
if (opt.isSet("help")) {
String helpText =
"Usage: java -classpath "+
FileUtil.getHomeDir() +
"/classes com.barrybecker4.game.twoplayer.go.server.GtpTesujisoftGoServer [options]\n" +
'\n' +
"-config config file\n" +
"-help display this help and exit\n" +
"-log file log GTP stream to file\n" +
"-version print version and exit\n";
System.out.print(helpText);
return null;
}
if (opt.isSet("version")) {
System.out.println("GtpTesujisoft " + GoController.VERSION);
return null;
}
PrintStream log;
if (opt.isSet("log")) {
File file = new File(opt.getString("log"));
log = new PrintStream(new FileOutputStream(file));
}
else {
String logFile = FileUtil.getHomeDir() + "/temp/" + "log.txt";
File file = new File(logFile);