Examples of GameDataAccessor


Examples of civquest.core.GameDataAccessor

   *  located on the same field.
   * @param unitGroup unit-group, expected to be non-empty
   * @return position of the given unit-group as described
   */
  private Coordinate getPosition(Set<Long> unitGroup) {
    GameDataAccessor gameData = quadMap.getGameData();
    MapObjectReader moReader = gameData.getMapObjectReader();
    Long aUnit = unitGroup.iterator().next();
    return moReader.getMapObjectPosition(aUnit);
  }
View Full Code Here

Examples of civquest.core.GameDataAccessor

  }

  public void actionPerformed(FunctionActionEvent e) {
    Set<Attacking> attackings = quadMap.getAMOForAttack();

    GameDataAccessor gameData = quadMap.getGameData();
    Coordinate workingFieldPos = quadMap.getWorkingFieldPos();

    if (CombatCalculator.canNeighborAttack(gameData, attackings, workingFieldPos)) {
      Coordinate attPos = attackings.iterator().next().getField().getPosition();
      DamageManager damageManager = Game.getGame().getDamageManager();
View Full Code Here

Examples of civquest.core.GameDataAccessor

    if (position != null) {
      Field field = quadMap.getFieldAtPosition(position);
   
      if (field != null) {
        GameDataAccessor gameData = quadMap.getGameData();
        CityReader cityReader = gameData.getCityReader();
        if (cityReader.isCityIDAvailable(field.getPosition())
          && cityReader.getCityID(field.getPosition()) != null) {
          Messages messages = Messages.getMessages();
          messages.info("ConstructTestCityAction", "CityAR",
                  "You can't build more than one city on a field!");
View Full Code Here

Examples of civquest.core.GameDataAccessor

    if (position != null) {
      Field field = quadMap.getFieldAtPosition(position);
   
      if (field != null) {
        GameDataAccessor gameData = quadMap.getGameData();
        FieldReader fieldReader = gameData.getFieldReader();

        Messages messages = Messages.getMessages();
        messages.info("MoveUnitsToWF", "FieldProp", "Information about field at coord "
                + field.getPosition() + ": " + field);
      }
View Full Code Here

Examples of civquest.core.GameDataAccessor

    queue.clear();

    queueFilled = true;
    Iterator<GameDataAccessor> gameDataIterator = getGameDataIterator();
    while (gameDataIterator.hasNext()) {
      GameDataAccessor currGameData = gameDataIterator.next();
      Buffer[][] currBuffers = gameDataToBuffers.get(currGameData);
      for (int x = 0; x < currBuffers.length; x++) {
        for (int y = 0; y < currBuffers[0].length; y++) {
          if (currBuffers[x][y].isImageCalculated()) {
            queue.add(currBuffers[x][y]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.