Examples of areUnitsAvailable()


Examples of civquest.map.FieldReader.areUnitsAvailable()

      Coordinate checkPos = (Coordinate)(iterator.next());

      // BWVMs own readers!
      FieldReader fieldReader = getFieldReader();
      MapObjectReader moReader = getMapObjectReader();
      if (fieldReader.areUnitsAvailable(checkPos)) {
        Iterator<Long> unitIterator = fieldReader.getUnits(checkPos);
        while (unitIterator.hasNext()) {
          Long currID = unitIterator.next();
          if (moReader.isMapObjectOwnerAvailable(currID)
            && getNationID().equals(moReader.getMapObjectOwner(currID))
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

  private static boolean containsForeignTargets(GameDataAccessor gameData,
                          Long owner, Coordinate pos) {
    FieldReader fieldReader = gameData.getFieldReader();
    MapObjectReader moReader = gameData.getMapObjectReader();

    if (!fieldReader.areUnitsAvailable(pos) || owner == null) {
      return false;
    } else {
      Iterator<Long> unitIterator = fieldReader.getUnits(pos);
      while (unitIterator.hasNext()) {
        Long currUnit = unitIterator.next();
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

    // perhaps a second MapView setting its working-field...)

    Coordinate workingFieldPos = mainMapView.getWorkingFieldPos();

    FieldReader fieldReader = gameData.getFieldReader();
    if (workingFieldPos != null && fieldReader.areUnitsAvailable(workingFieldPos)) {
      Iterator<Long> unitIDs = fieldReader.getUnits(workingFieldPos);
      if (unitIDs.hasNext()) {
        unitInfoComp.setUnit(unitIDs.next());
      } else {
        unitInfoComp.setUnit(null);
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

        this.wfUnits.clear();
        this.wfInfoPanel.removeAll();
        FieldReader fieldReader = this.gameData.getFieldReader();

        if (this.workingFieldPos != null &&
                fieldReader.areUnitsAvailable(this.workingFieldPos)) {

            Iterator<Long> iterator = fieldReader.getUnits(
                this.workingFieldPos);
            for (;iterator.hasNext();) {
                Long unitID = iterator.next();
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

       
        Coordinate[] coords = MapData.getCoords(fieldIDs);
        FieldReader fieldReader = this.gameData.getFieldReader();

        for (Coordinate coord : coords) {
            if (fieldReader.areUnitsAvailable(coord)) {
                Iterator<Long> uit = fieldReader.getUnits(coord);
                for (;uit.hasNext();) {
                    Long unitID = uit.next();
                    if (!this.markedFieldUnits.containsKey(unitID)) {
                        UnitInfoComponent infoComponent;
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

       
        Coordinate[] coords = MapData.getCoords(fieldIDs);
        FieldReader fieldReader = this.gameData.getFieldReader();

        for (Coordinate coord : coords) {
            if (fieldReader.areUnitsAvailable(coord)) {
                Iterator<Long> uit = fieldReader.getUnits(coord);
                for (;uit.hasNext();) {
                    Long unitID = uit.next();
                    if (this.markedFieldUnits.containsKey(unitID) &&
                            !this.activeUnits.containsKey(unitID)) {
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

     */
    public Set<Long> getUnitsOnFields() {
        Set<Long> units = new HashSet();
        FieldReader fieldReader = this.gameData.getFieldReader();
        for (Coordinate coord : this.fields) {
            if (fieldReader.areUnitsAvailable(coord)) {
                Iterator<Long> uit = fieldReader.getUnits(coord);
                for (;uit.hasNext();) {
                    units.add(uit.next());
                }
            }
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

  public int getInformationScore() {
    FieldReader fieldReader = gameData.getFieldReader();

    // TODO: Add case that unit-model is not known
    if (!fieldReader.areUnitsAvailable(position)) {
      return 0;
    }
    return 100;
  }
View Full Code Here

Examples of civquest.map.FieldReader.areUnitsAvailable()

   */
  private void updateUnitList() throws RulesetException {
    FieldReader fieldReader = gameData.getFieldReader();
    MapObjectReader moReader = gameData.getMapObjectReader();

    if (!fieldReader.areUnitsAvailable(position)) {
      // No information given according to VisibilityManager
      units.clear();
    } else {
      Iterator<Long> ruIterator = fieldReader.getUnits(position);
      Set<Long> realUnitIDs = new HashSet<Long>();
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.