示例#1
0
 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;
 }
示例#2
0
 /**
  * ( | 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);
 }
示例#3
0
 public static Power getPower(Game game, String[] message) {
   return game.getPower(message[1]);
 }
示例#4
0
 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);
 }