public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException {
		Counter<String> clsCountMap = new Counter<String>();
		String logDir = "./log/";
		for(int i = 0; i < args.length; i++){
			if(args[i].startsWith("-")){
				if(args[i].equals("-c")){
					i++;
					String clsName = args[i];
					i++;
					int num = Integer.parseInt(args[i]);

					clsCountMap.put(clsName, num);
				}
				else if(args[i].equals("-l")){
					i++;
					logDir = args[i];
				}
			}
		}
		if(clsCountMap.isEmpty()){
			System.err.println("Usage:"+ClientStarter.class+" -c clientClass num [-c clientClass num ...] [-l logDir]");
			return;
		}

		
		int playerNum = clsCountMap.getTotalCount();
		List<Player> playerList = new ArrayList<Player>();
//		for(int i = 0; i < playerNum; i++){
//			playerList.add((Player) Class.forName(clsName).newInstance());
//		}
		for(String clsName:clsCountMap){
			int num = clsCountMap.get(clsName);
			for(int i = 0; i < num; i++){
				playerList.add((Player) Class.forName(clsName).newInstance());
			}
		}
		
		String timeString = CalendarTools.toDateTime(System.currentTimeMillis()).replaceAll("[\\s-/:]", "");
		File logFile = new File(String.format("%s/aiwolfGame%s.log", logDir, timeString));
		
		GameServer gameServer = new DirectConnectServer(playerList);
		GameSetting gameSetting = GameSetting.getDefaultGame(playerNum);
		AIWolfGame game = new AIWolfGame(gameSetting, gameServer);
		game.setLogFile(logFile);
		game.setRand(new Random());
//		game.init();
		game.start();
//		game.finish();
	}