Class SoloGameManager<T extends AbstractSoloPlayer>

java.lang.Object
com.codingame.gameengine.core.GameManager<T>
com.codingame.gameengine.core.SoloGameManager<T>
Type Parameters:
T - Your implementation of AbstractMultiplayerPlayer

public class SoloGameManager<T extends AbstractSoloPlayer> extends GameManager<T>
The 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.
  • Constructor Details

    • SoloGameManager

      public SoloGameManager()
  • Method Details

    • readGameProperties

      protected void readGameProperties(com.codingame.gameengine.core.InputCommand iCmd, Scanner s)
      Specified by:
      readGameProperties in class GameManager<T extends AbstractSoloPlayer>
    • getTestCaseInput

      public List<String> getTestCaseInput()
      Returns the current test case the game got at initialization.

      You can set it with the SoloGameRunner.

      Returns:
      The test case for this game.
    • getPlayer

      public T getPlayer()
      Get the player
      Returns:
      player
    • winGame

      public void winGame()
      Ends the game as a victory
    • loseGame

      public void loseGame()
      Ends the game as a fail
    • winGame

      public void winGame(String message)
      Ends the game as a victory with a green message.
      Parameters:
      message - the message to display in green
    • loseGame

      public void loseGame(String message)
      Ends the game as a fail with a red message
      Parameters:
      message - the message to display in red
    • allPlayersInactive

      protected boolean allPlayersInactive()
      Specified by:
      allPlayersInactive in class GameManager<T extends AbstractSoloPlayer>
    • getGameSummaryOutputCommand

      protected com.codingame.gameengine.core.OutputCommand getGameSummaryOutputCommand()
      Specified by:
      getGameSummaryOutputCommand in class GameManager<T extends AbstractSoloPlayer>