T - Your implementation of AbstractMultiplayerPlayerpublic final class MultiplayerGameManager<T extends AbstractMultiplayerPlayer> extends GameManager<T>
AbstractMultiplayerPlayer takes care of running each turn of a multiplayer game and computing each visual frame of the replay. It
provides many utility methods that handle instances of your implementation of AbstractMultiplayerPlayer.log, out, players| Constructor and Description |
|---|
MultiplayerGameManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allPlayersInactive() |
protected void |
dumpGameProperties() |
void |
endGame()
Set game end.
|
List<T> |
getActivePlayers()
Get all the active players.
|
Properties |
getGameParameters()
The game parameters are used to get additional information from the Game Runner.
|
protected com.codingame.gameengine.core.OutputCommand |
getGameSummaryOutputCommand() |
T |
getPlayer(int i)
Get player with index i
|
int |
getPlayerCount()
Get initial number of players.
|
List<T> |
getPlayers()
Get all the players.
|
Long |
getSeed()
The seed is used to generated parameters such as width and height.
If a seed is present in the given input, the input value should override the generated values. |
protected void |
readGameProperties(com.codingame.gameengine.core.InputCommand iCmd,
Scanner s) |
addToGameSummary, addTooltip, addTooltip, formatErrorMessage, formatSuccessMessage, getFrameDuration, getLeagueLevel, getMaxTurns, getTurnMaxTime, isGameEnd, putMetadata, registerModule, setFrameDuration, setMaxTurns, setTurnMaxTime, setViewData, setViewData, setViewGlobalDataprotected void readGameProperties(com.codingame.gameengine.core.InputCommand iCmd,
Scanner s)
readGameProperties in class GameManager<T extends AbstractMultiplayerPlayer>protected void dumpGameProperties()
dumpGameProperties in class GameManager<T extends AbstractMultiplayerPlayer>public int getPlayerCount()
public Long getSeed()
The seed is used to generated parameters such as width and height.
If a seed is present in the given input, the input value should override the generated values.
Long containing a given or generated seed.public Properties getGameParameters()
The game parameters are used to get additional information from the Game Runner.
Properties containing the given parameters.public List<T> getActivePlayers()
public T getPlayer(int i) throws IndexOutOfBoundsException
i - Player indexIndexOutOfBoundsException - if there is no player at that indexpublic void endGame()
endGame in class GameManager<T extends AbstractMultiplayerPlayer>protected boolean allPlayersInactive()
allPlayersInactive in class GameManager<T extends AbstractMultiplayerPlayer>protected com.codingame.gameengine.core.OutputCommand getGameSummaryOutputCommand()
getGameSummaryOutputCommand in class GameManager<T extends AbstractMultiplayerPlayer>Copyright © 2018. All rights reserved.