public class Main
extends java.lang.Object
Examples:
java Main
java Main savedData.csv
java Main --data=gamedata.csv
java Main --data=gamedata2.csv mygame.csv
Note: while not required, it is also useful to have a --debug and --verbose (or -d and -v). If using
the provided Logger.java, the argument to enable it was --debug-level={int}.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Main.ProgramArguments
Internal class to handle program arguments.
|
| Constructor and Description |
|---|
Main() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Takes in command line parameters, looks through the program arguments.
|
public static void main(java.lang.String[] args)
ProgramArguments pargs = new ProgramArguments(args);
GameData data = new CSVGameData(pargs.gamedata, pargs.saveData);
GameView view = new ConsoleView();
CombatEngine engine = new CombatEngine(data, view);
GameController controller = new GameController(data, view, engine);
controller.start();
args - the command line arguments option