Пример #1
0
 @Override
 public Field getField(String fieldName) {
   String json = Utilities.getResource(JSON_DIR + fieldName + JSON_POST_FIX);
   return gson.fromJson(json, Field.class);
 }
Пример #2
0
  // returns a list of available classes
  public List<PlayerActor> getAvailableClasses() {

    String json = Utilities.getResource(CHARACTERS);
    PlayerActor[] playerActors = gson.fromJson(json, PlayerActor[].class);
    return Arrays.asList(playerActors);
  }