Package org.jpokemon.trainer

Examples of org.jpokemon.trainer.Player


    Message message = new Message("New battle request");
    JSONObject lobbyJson = generateJson(lobby);

    for (List<String> team : lobby.getTeams()) {
      for (String name : team) {
        Player player = PlayerManager.getPlayer(name);
        PlayerManager.pushJson(player, lobbyJson);

        if (sendNewRequestMessage) {
          PlayerManager.pushMessage(player, message);
        }
View Full Code Here


        // TODO - punish player
      }
    }

    if (trainer instanceof Player) {
      Player player = (Player) trainer;

      pushLog(false);

      JSONObject json = new JSONObject();
      try {
View Full Code Here

      e.printStackTrace();
    }

    for (Slot slot : this) {
      if (slot.trainer() instanceof Player) {
        Player player = (Player) slot.trainer();

        PlayerManager.pushJson(player, json);
      }
    }
  }
View Full Code Here

      while (!slots.isEmpty()) {
        String slotKey = (String) slots.keySet().toArray()[0];
        Slot slot = slots.remove(slotKey);

        if (slot.trainer() instanceof Player) {
          Player p = (Player) slot.trainer();
          PlayerManager.pushJson(p, json);
          PlayerManager.popActivity(p, this);
        }
      }
    }
View Full Code Here

      slot.applySlotEffects();
    }
  }

  private void addTrainerToPlayerHistory(String id) {
    Player p;

    for (Slot s : this) {
      if (!(s.trainer() instanceof Player))
        continue;

      p = (Player) s.trainer();

      // If the trainer is already recorded, IllegalArgumentException will fire
      p.record().putTrainer(id);
    }
  }
View Full Code Here

TOP

Related Classes of org.jpokemon.trainer.Player

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.