Package civquest.map

Examples of civquest.map.FieldDistanceInfo


        if (neighborCoords[n].x == pos.x || neighborCoords[n].y == pos.y) {
          distance = straightDistance;
        } else {
          distance = diagonalDistance;
        }
        retValue[n] = new FieldDistanceInfo(getField(neighborCoords[n]), distance);
      } else {
        Coordinate adjustedCoord = adjustToMapSize(neighborCoords[n]);
        if (adjustedCoord == null) {
          retValue[n] = null;
        } else {
          int distance = 0;
          if (adjustedCoord.y == pos.y) {
            distance = straightDistance;
          } else {
            distance = diagonalDistance;
          }
          retValue[n] = new FieldDistanceInfo(getField(adjustedCoord), distance);
        }
      }
    }
   
    return retValue;
View Full Code Here


          || (column == adjustedCoord.x - adjustedCoord.y)) {
          distance = diagonalDistance;
        } else {
          distance = straightDistance;
        }
        retValue[n] = new FieldDistanceInfo(getField(adjustedCoord), distance);
      }
    }

    return retValue;
  }
View Full Code Here

TOP

Related Classes of civquest.map.FieldDistanceInfo

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.