|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectj4cevo.Tile
A Tile is a location on the map.
| Nested Class Summary | |
static class |
Tile.BattleForecast
|
static class |
Tile.Info
|
static class |
Tile.RessourceInfo
|
| Field Summary | |
static Protocol.TerrainType |
fArctic
|
static Protocol.TerrainType |
fDesert
|
static Protocol.TerrainType |
fForest
|
static Protocol.TerrainType |
fGrass
|
static Protocol.TerrainType |
fHills
|
static Protocol.TerrainType |
fMountains
|
static Protocol.TerrainType |
fOcean
|
static Protocol.TerrainType |
fPrairie
|
static Protocol.TerrainType |
fShore
|
static Protocol.TerrainType |
fSwamp
|
static Protocol.TerrainType |
fTundra
|
| Method Summary | |
int |
distance(Tile destination)
distance measures long (transversal) moves with 3, other (short moves) with 2. |
int |
getBattleForecast(Tile.BattleForecast forecast,
int modelIndex,
int experience,
int health,
int flags,
int movement,
int playerIndex)
|
static int |
getBattleForecast(Tile.BattleForecast forecast,
int modelIndex,
int experience,
int health,
int flags,
int movementPointsLeft,
int playerIndex,
int locationIndex)
|
int |
getBattleForecast(Tile.BattleForecast forecast,
ModelBase model,
int experience,
int health,
int flags,
int movement)
This query allows to simulate an attack of a hypothetical attacker on an existing defender. |
int |
getBattleForecast(Tile.BattleForecast forecast,
UnitBase u,
int movementPointsLeft)
|
Tile.Info |
getCityTileInfo()
Gets exact resource production of a tile for the city which is currently exploiting it. |
int |
getDamage()
Gets resource production of a tile for the city which is currently hypothetically exploiting it. |
static int |
getDamage(int tileValue)
evaluates the percentual damage for ground units when spending movementpoints there does not matter if player owns hanging gardens wonder |
Unit |
getDefender()
Gets the own unit which will defend a certain tile. |
java.lang.String |
getFlagNames()
|
int |
getIndex()
|
Tile.Info |
getInfo()
Request resource production of a tile. |
int |
getLastObserved()
Gets the turn this tile has been observed last |
static int |
getMovementCost(int startValue,
boolean transversal,
int endValue,
Model model,
boolean hasShinkansen)
|
int |
getMovementCost(int dx,
int dy,
Model model)
|
PlayerBase |
getOwner()
Gets the owner of a tile, if any |
Tile.RessourceInfo |
getRessourceInfo()
Gets the ressource production considering terrain type and specialFlags only. |
Protocol.TerrainType |
getTerrainType()
|
static Protocol.TerrainType |
getTerrainType(int tileValue)
|
java.util.Iterator |
getUnits()
|
boolean |
hasCity()
|
static boolean |
hasCity(int tileValue)
|
boolean |
hasEnemyCity()
|
static boolean |
hasEnemyCity(int tileValue)
|
boolean |
hasEnemyUnit()
|
static boolean |
hasEnemyUnit(int tileValue)
|
int |
hashCode()
|
static boolean |
hasRailRoad(int tileValue)
|
boolean |
hasRoad()
|
static boolean |
hasRoad(int tileValue)
|
boolean |
hasUnit()
|
static boolean |
hasUnit(int tileValue)
|
boolean |
hasWater()
|
boolean |
hasWaterAccess()
|
java.lang.String |
identification()
|
boolean |
isIrrigatable()
Queries, wheter this tile is irrigatable at all To actually irrigate it, you need waterAccess also |
boolean |
isSet(int flag)
Queries whether a flag is set. |
static boolean |
isSet(int tileValue,
int flag)
|
boolean |
mayEnter(Model model)
|
static boolean |
mayEnter(Model model,
int tileValue)
|
void |
movement(Tile destination,
Map.RelativeMovement r)
Fills in the required movement to get from this tile to destination tile |
boolean |
requiresBridge()
|
Tile |
tileRelativeAt(int dx,
int dy)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Protocol.TerrainType fArctic
public static final Protocol.TerrainType fDesert
public static final Protocol.TerrainType fForest
public static final Protocol.TerrainType fGrass
public static final Protocol.TerrainType fHills
public static final Protocol.TerrainType fMountains
public static final Protocol.TerrainType fOcean
public static final Protocol.TerrainType fPrairie
public static final Protocol.TerrainType fShore
public static final Protocol.TerrainType fSwamp
public static final Protocol.TerrainType fTundra
| Method Detail |
public final int getBattleForecast(Tile.BattleForecast forecast,
int modelIndex,
int experience,
int health,
int flags,
int movement,
int playerIndex)
public final int getBattleForecast(Tile.BattleForecast forecast,
UnitBase u,
int movementPointsLeft)
public final int getBattleForecast(Tile.BattleForecast forecast,
ModelBase model,
int experience,
int health,
int flags,
int movement)
forecast - object to hold the forecastexperience - the experience of the attacking unithealth - the health of the attacking unitflags - the flags of the attacking unitmodel - the model of the attacking unitmovement -
public final Tile.Info getCityTileInfo()
public final int getDamage()
public Unit getDefender()
public java.lang.String getFlagNames()
public int hashCode()
public final int getIndex()
public final Tile.Info getInfo()
public int getLastObserved()
public int getMovementCost(int dx,
int dy,
Model model)
public PlayerBase getOwner()
public Tile.RessourceInfo getRessourceInfo()
public final Protocol.TerrainType getTerrainType()
public java.util.Iterator getUnits()
public boolean isIrrigatable()
hasWaterAccess()public final boolean isSet(int flag)
flag - the flag to be queried
Protocol.TileFlagspublic int distance(Tile destination)
destination - public final boolean hasCity()
public final boolean hasEnemyCity()
public final boolean hasEnemyUnit()
public final boolean hasUnit()
public boolean hasWater()
public boolean hasWaterAccess()
public java.lang.String identification()
public final boolean mayEnter(Model model)
public void movement(Tile destination,
Map.RelativeMovement r)
r - to incorporate the relative x and y distancesdestination - movementpublic final boolean requiresBridge()
public final Tile tileRelativeAt(int dx,
int dy)
public java.lang.String toString()
public static final int getBattleForecast(Tile.BattleForecast forecast,
int modelIndex,
int experience,
int health,
int flags,
int movementPointsLeft,
int playerIndex,
int locationIndex)
public static int getDamage(int tileValue)
tileValue -
public static int getMovementCost(int startValue,
boolean transversal,
int endValue,
Model model,
boolean hasShinkansen)
public static final Protocol.TerrainType getTerrainType(int tileValue)
public static final boolean isSet(int tileValue,
int flag)
public static final boolean hasCity(int tileValue)
public static final boolean hasEnemyCity(int tileValue)
public static final boolean hasEnemyUnit(int tileValue)
public static boolean hasRailRoad(int tileValue)
public boolean hasRoad()
public static boolean hasRoad(int tileValue)
public static final boolean hasUnit(int tileValue)
public static final boolean mayEnter(Model model,
int tileValue)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||