Package model.overlays
Class MenuScoreBoardOverlayModel
java.lang.Object
model.overlays.MenuOverlayModel
model.overlays.MenuScoreBoardOverlayModel
Represents the menu overlay model used for the scoreboard.
-
Field Summary
Fields inherited from class model.overlays.MenuOverlayModel
menuModel -
Constructor Summary
ConstructorsConstructorDescriptionMenuScoreBoardOverlayModel(MenuModel menuModel) Constructs a MenuScoreBoardOverlayModel with the specified MenuModel. -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of users ordered by their best scores.voidupdate()Updates the state of the menu overlay.voidUpdates 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.
-
Constructor Details
-
MenuScoreBoardOverlayModel
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:
updatein classMenuOverlayModel
-
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
Returns the list of users ordered by their best scores.- Returns:
- an ArrayList of users ordered by their best scores
-