public void start() throws Exception { URL url = new URL("http://localhost:5000/gameInit"); URLConnection urlCon = url.openConnection(); GameInitMessage gim = GameInitMessage.parseFrom(urlCon.getInputStream()); urlCon.getInputStream().close(); this.properties = new PropertyWrapper(gim); gameId = gim.getGameId(); }
public PropertyWrapper(GameInitMessage gim) { values = new ArrayList<Integer>(); changed = new ArrayList<Boolean>(); for (FunProperty fp : gim.getInitialConfig().getBaselineList()) { values.add(fp.getValue()); changed.add(false); } }