T - Your implementation of AbstractMultiplayerPlayerpublic class SoloGameManager<T extends AbstractSoloPlayer> 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 |
|---|
SoloGameManager() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allPlayersInactive() |
protected com.codingame.gameengine.core.OutputCommand |
getGameSummaryOutputCommand() |
T |
getPlayer()
Get the player
|
List<String> |
getTestCaseInput()
Returns the current test case the game got at initialization.
|
void |
loseGame()
Ends the game as a fail
|
void |
loseGame(String message)
Ends the game as a fail with a red message
|
protected void |
readGameProperties(com.codingame.gameengine.core.InputCommand iCmd,
Scanner s) |
void |
winGame()
Ends the game as a victory
|
void |
winGame(String message)
Ends the game as a victory with a green message.
|
addToGameSummary, addTooltip, addTooltip, dumpGameProperties, endGame, execute, 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 AbstractSoloPlayer>public List<String> getTestCaseInput()
You can set it with the SoloGameRunner.
public T getPlayer()
public void winGame()
public void loseGame()
public void winGame(String message)
message - the message to display in greenpublic void loseGame(String message)
message - the message to display in redprotected boolean allPlayersInactive()
allPlayersInactive in class GameManager<T extends AbstractSoloPlayer>protected com.codingame.gameengine.core.OutputCommand getGameSummaryOutputCommand()
getGameSummaryOutputCommand in class GameManager<T extends AbstractSoloPlayer>Copyright © 2019. All rights reserved.