public interface GameState extends GameStateFieldContext
| Modifier and Type | Method and Description |
|---|---|
int |
getAttackIndex()
Officially "the attackIndex field is unnecessary for bots -- it's used by our client to show/hide attack arrows when appropriate."
|
default String |
getChatRoom()
Identifier of the main game chat room.
|
int |
getColumns()
Horizontal size of the map.
|
default Collection<Field> |
getFields() |
com.google.common.collect.ImmutableMap<Position,Field> |
getFieldsMap() |
GameStarted |
getGameStartedData() |
default Player |
getMyPlayer() |
default int |
getMyPlayerIndex()
Index of bot's player.
|
default Set<Integer> |
getMyTeamIndexes() |
default Set<Position> |
getNeighbourPositions(Position position) |
default Set<Field> |
getNeighbours(Field field) |
com.google.common.collect.ImmutableList<Player> |
getPlayers()
Players currently playing and those already dead.
|
default String |
getReplayId()
Replay identifier.
|
int |
getRows()
Vertical size of the map.
|
default String |
getTeamChatRoom()
Identifier of the private team chat room.
|
int |
getTurn()
"Server turn" which is increased after every update (possibility of making a move).
|
default Field[][] |
getTwoDimensionalArrayOfFields() |
default Collection<VisibleField> |
getVisibleFields() |
default com.google.common.collect.ImmutableMap<Position,VisibleField> |
getVisibleFieldsMap() |
default boolean |
isValidPosition(Position position) |
default Position |
positionFromIndex(int index) |
default int |
positionToIndex(Position position) |
int getColumns()
int getRows()
int getTurn()
int getAttackIndex()
com.google.common.collect.ImmutableList<Player> getPlayers()
GameStarted getGameStartedData()
default Player getMyPlayer()
default com.google.common.collect.ImmutableMap<Position,VisibleField> getVisibleFieldsMap()
default Collection<Field> getFields()
default Collection<VisibleField> getVisibleFields()
default Field[][] getTwoDimensionalArrayOfFields()
default Position positionFromIndex(int index)
default int positionToIndex(Position position)
positionToIndex in interface GameStateFieldContextdefault boolean isValidPosition(Position position)
default Set<Integer> getMyTeamIndexes()
getMyTeamIndexes in interface GameStateFieldContextdefault int getMyPlayerIndex()
getMyPlayerIndex in interface GameStateFieldContextdefault String getReplayId()
default String getChatRoom()
default String getTeamChatRoom()
default Set<Field> getNeighbours(Field field)
getNeighbours in interface GameStateFieldContextCopyright © 2017. All rights reserved.