public class GameState.VisibleField extends GameState.Field
position, terrainType| Modifier and Type | Method and Description |
|---|---|
GameState.VisibleField |
asVisibleField()
Converts to a VisibleField instance that exposes more details about the field.
|
int |
getArmy() |
Optional<Integer> |
getOwnerIndex()
Index of player that owns the field.
|
boolean |
hasOwner() |
boolean |
isBlank()
Returns true if field is represented with a white square in the brower (not mountain, not city, no owner).
|
boolean |
isCity() |
boolean |
isGeneral() |
boolean |
isObstacle()
If the field is not visible, true indicates city or mountain, if the field is visible true indicates only mountain.
|
boolean |
isOwnedBy(int playerIndex) |
boolean |
isOwnedByEnemy()
Returns true if field has an owner but owner is not in the same team as bot.
|
boolean |
isOwnedByMe() |
boolean |
isOwnedByMyTeam() |
boolean |
isVisible()
Determines whether in the current round the field is visible or in the fog of war.
|
String |
toString() |
getIndex, getNeighbours, getPosition, getVisibleNeighbourspublic boolean isVisible()
GameState.FieldGameState.Field.asVisibleField() method can be used to obtain additional info about this field.isVisible in class GameState.Fieldpublic boolean isObstacle()
GameState.FieldisObstacle in class GameState.Fieldpublic GameState.VisibleField asVisibleField()
GameState.FieldGameState.Field.isVisible().asVisibleField in class GameState.Fieldpublic boolean isOwnedBy(int playerIndex)
public boolean isOwnedByMe()
public boolean isOwnedByMyTeam()
public boolean isOwnedByEnemy()
public boolean isBlank()
public boolean hasOwner()
public int getArmy()
public boolean isGeneral()
public boolean isCity()
public String toString()
toString in class GameState.FieldCopyright © 2017. All rights reserved.