Class MenuScoreBoardOverlayModel

java.lang.Object
model.overlays.MenuOverlayModel
model.overlays.MenuScoreBoardOverlayModel

public class MenuScoreBoardOverlayModel extends MenuOverlayModel
Represents the menu overlay model used for the scoreboard.
  • Constructor Details

    • MenuScoreBoardOverlayModel

      public MenuScoreBoardOverlayModel(MenuModel menuModel)
      Constructs a MenuScoreBoardOverlayModel with the specified MenuModel.
      Parameters:
      menuModel - the MenuModel associated with this overlay
  • Method Details

    • update

      public void update()
      Updates the state of the menu overlay.

      This method is not used in this class.

      Specified by:
      update in class MenuOverlayModel
    • updateUserScores

      public void updateUserScores()
      Updates the user scores by getting the list of users from the UsersManagerModel, sorting them by their best score in descending order, and saving the result in the orderedUsers variable.
    • getOrderedUsers

      public ArrayList<User> getOrderedUsers()
      Returns the list of users ordered by their best scores.
      Returns:
      an ArrayList of users ordered by their best scores