Class EndScreenModule

java.lang.Object
com.codingame.gameengine.module.endscreen.EndScreenModule
All Implemented Interfaces:
Module

public class EndScreenModule extends Object implements Module
The EndScreen takes care of displaying and animating an end screen with the scores of the players at the end of the game.
  • Method Details

    • setScores

      public void setScores(int[] scores)
      Send scores to the module
      Parameters:
      scores - the scores of the different players, the index matches the player.getIndex()
    • setScores

      public void setScores(int[] scores, String[] displayedText)
      Send scores to the module
      Parameters:
      scores - the scores of the different players, the index matches the player.getIndex()
      displayedText - the text displayed instead of the score of a player, if null or empty string for a player the score will still be displayed
    • setTitleRankingsSprite

      public void setTitleRankingsSprite(String spriteName)
      Allows you to set the sprite used as the title of the ranking board
      Parameters:
      spriteName - the name of the sprite you want to use default is "logo.png"
    • getTitleRankingsSprite

      public String getTitleRankingsSprite()
      Returns:
      the name of the sprite that will be used as the title of the ranking board
    • onGameInit

      public final void onGameInit()
      Description copied from interface: Module
      Called by the game manager after calling the Referee's init method. The module must be registered to the game manager.
      Specified by:
      onGameInit in interface Module
    • onAfterGameTurn

      public final void onAfterGameTurn()
      Description copied from interface: Module
      Called by the game manager after calling the Referee's gameTurn method. The module must be registered to the game manager.
      Specified by:
      onAfterGameTurn in interface Module
    • onAfterOnEnd

      public final void onAfterOnEnd()
      Description copied from interface: Module
      Called by the game manager after calling the Referee's onEnd method. The module must be registered to the game manager.
      Specified by:
      onAfterOnEnd in interface Module