Package civquest.nation

Examples of civquest.nation.RestrictedToNation


    }

  }

  public RestrictedToNation[] getResToNations() {
    return new RestrictedToNation[] {new RestrictedToNation()};
  }
View Full Code Here


//       removeCity.notify(manager.getRestrictedToNation(), before, after);     
//     }
//   }

  public RestrictedToNation[] getResToNations() {
    return new RestrictedToNation[] {new RestrictedToNation()};
//     return new RestrictedToNation[] {manager.getRestrictedToNation()};
  }
View Full Code Here

  private void notifyListeners(GameChange gameChange,
                 RestrictedToNation resToNation,
                 boolean before, boolean after) {

    RestrictedToNation oldResToNation = null;
    if (resToNation != null) {
      oldResToNation = gameChange.getResToNation();
      gameChange.setResToNation(resToNation);
    }
View Full Code Here

    if (owner == null) {
      return false;
    } else {
      FieldReader fieldReader = gameData.getFieldReader();
      MapObjectReader moReader = gameData.getMapObjectReader();
      RestrictedToNation resToNation = gameData.getRestrictedToNation();

      if (fieldReader.areMapObjectsAvailable(to)) {
        Iterator<Long> mapObjects = fieldReader.getMapObjects(to);
        while (mapObjects.hasNext()) {
          Long mo = mapObjects.next();
View Full Code Here

     * @param coordinate the coordinate of the current field
     */
    public static void removeObjects(Vector<MapObject> mapObjects,
            QuadMap qMap, Coordinate coordinate) {

        RestrictedToNation resToNation = qMap.getGameData()
            .getRestrictedToNation();
        Iterator<MapObject> moit = mapObjects.iterator();
        for (;moit.hasNext();) {
            MapObject mapObject = moit.next();
            if (mapObject instanceof City) {
View Full Code Here

  private RestrictedToNation resToNation = null;
  private Long[] affectedObjects = new Long[0];

  public AbstractGameChange() {
    resToNation = new RestrictedToNation();
  }
View Full Code Here

  public AbstractGameChange() {
    resToNation = new RestrictedToNation();
  }

  public AbstractGameChange(Long... ids) {
    resToNation = new RestrictedToNation();
    affectedObjects = ids;
  }
View Full Code Here

    resToNation = new RestrictedToNation();
    affectedObjects = ids;
  }

  public AbstractGameChange(Long[]... ids) {
    resToNation = new RestrictedToNation();
    int sumLength = 0;
    for (Long[] currArray : ids) {
      sumLength += currArray.length;
    }
    affectedObjects = new Long[sumLength];
View Full Code Here

  }

  /********************************* Change of display-nation **************/

  private void scrollToStartPosition(GameDataAccessor gameData) {
    RestrictedToNation resToNation = gameData.getRestrictedToNation();
    CityReader cityReader = gameData.getCityReader();
    NationReader nationReader = gameData.getNationReader();

    Iterator<Long> iterator;
    if (resToNation.isInAllNationsMode()) {
      iterator = null;
    } else if (resToNation.isInSpecificNationsMode()) {
      Long[] forNations = resToNation.getForNations();
      if (forNations.length > 0) {
        iterator = nationReader.getAllCities(forNations[0]);
      } else {
        iterator = null;
      }
View Full Code Here

  }

  private Set<Unit> getOwnActiveUnits() {
    Set<Unit> retSet = new HashSet<Unit>();

    RestrictedToNation resToNation = gameDataAccessor.getRestrictedToNation();
    Group group = getActiveGroup();
    Iterator<Long> unitsIterator = group.getUnitIterator();
    while (unitsIterator.hasNext()) {
      Unit unit = Game.getMapData().getUnit(unitsIterator.next());
      if (unit != null && resToNation.contains(unit.getOwnerID())) {
        retSet.add(unit);
      }
    }
    return retSet;
  }
View Full Code Here

TOP

Related Classes of civquest.nation.RestrictedToNation

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.