if (args.length == 1) {
// if there is only one arg assume it is the name of the game
gameName = args[0];
}
else if (args.length > 1) {
CommandLineOptions options = new CommandLineOptions(args);
if (options.contains("help")) { // NON-NLS
GameContext.log(0, "Usage: -name <game> [-locale <locale>]"); // NON_NLS
}
// create a game panel of the appropriate type based on the name of the class passed in.
// if no game is specified as an argument, then we show a menu for selecting a game
gameName = options.getValueForOption("name", defaultGame);
if (options.contains("locale")) {
// then a locale has been specified
String localeName = options.getValueForOption("locale", "ENGLISH");
LocaleType locale = GameContext.getLocale(localeName, true);
GameContext.setLocale(locale);
}
}