private static void manageArgs(String[] args) {
		for (int i = 0; i < args.length; i++) {
			switch (args[i].trim().toLowerCase()) {
				case "nogui":
					nogui = true;
					break;
				case "server":
					startServer = true;
					break;
				case "port":
					if (i < args.length - 1) {
						port = parsePositiveInt(args[++i]);
					} else {
						System.err.println("Found argument 'port', but no port was given");
						System.exit(1);
					}
					break;
				default:
					System.err.println("Unknown command: " + args[i].trim().toLowerCase());
					System.exit(1);
					break;
			}
		}
	}