Class ScoreBoard

java.lang.Object
com.csse3200.game.ui.minigames.ScoreBoard

public class ScoreBoard extends Object
UI component for displaying the scoreboard for mini-game Snake and BirdieDash Manages score and medal display with dynamic scaling based on screen size.
  • Constructor Details

    • ScoreBoard

      public ScoreBoard(int initialScore, MiniGameNames gameName)
      Creates a new SnakeScoreBoard with the initial score.
      Parameters:
      initialScore - The starting score to display.
  • Method Details

    • scoreBoardSetUp

      public void scoreBoardSetUp()
    • updateScore

      public void updateScore(int newScore)
      Updates the score displayed on the scoreboard.
      Parameters:
      newScore - The new score to display.
    • resize

      public void resize()
      Adjusts the scoreboard's size and position based on screen size.
    • dispose

      public void dispose()
      Disposes of the scoreboard resources.