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()
      Specified by:
      onGameInit in interface Module
    • onAfterGameTurn

      public final void onAfterGameTurn()
      Specified by:
      onAfterGameTurn in interface Module
    • onAfterOnEnd

      public final void onAfterOnEnd()
      Specified by:
      onAfterOnEnd in interface Module