public static Province getProvince(Game game, String[] message) { Province province; if (message[0].equals("(")) { province = game.getProvince(message[1]); } else { province = game.getProvince(message[0]); } return province; }
/** * ( | RUS | AMY | MOS | ) * * @param message * @return */ public static Region getRegion(Game game, String[] message) { String name; String unitType = message[2]; if (unitType.equals("FLT") && message[3].equals("(")) { // region0 name = message[4] + message[5]; } else { name = message[3] + unitType.toString(); } return game.getRegion(name); }
public static Power getPower(Game game, String[] message) { return game.getPower(message[1]); }
public static Region getDestinationRegion(Game game, String unitType, String[] message) { if (message[0].equals("(")) { return game.getRegion(message[1] + message[2]); } return game.getRegion(message[0] + unitType); }