public class GameState.Field extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Position |
position |
protected FieldTerrainType |
terrainType |
| Modifier and Type | Method and Description |
|---|---|
GameState.VisibleField |
asVisibleField()
Converts to a VisibleField instance that exposes more details about the field.
|
int |
getIndex() |
Set<GameState.Field> |
getNeighbours()
Returns fields that can be reached from this field in one move.
|
Position |
getPosition() |
Set<GameState.VisibleField> |
getVisibleNeighbours()
Same as
getNeighbours() but filtered with isVisible(). |
boolean |
isObstacle()
If the field is not visible, true indicates city or mountain, if the field is visible true indicates only mountain.
|
boolean |
isVisible()
Determines whether in the current round the field is visible or in the fog of war.
|
String |
toString() |
protected Position position
protected FieldTerrainType terrainType
public Position getPosition()
public boolean isVisible()
asVisibleField() method can be used to obtain additional info about this field.public boolean isObstacle()
public GameState.VisibleField asVisibleField()
isVisible().public Set<GameState.Field> getNeighbours()
public Set<GameState.VisibleField> getVisibleNeighbours()
getNeighbours() but filtered with isVisible().public int getIndex()
Copyright © 2017. All rights reserved.