java.lang.Object
view.EndGameController
-
Constructor Summary
ConstructorsConstructorDescriptionThe EndGameController function is a constructor that initializes the EndGameController class. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe initializeLabels function initializes the scoreBoardNames and scoreBoardScores ArrayLists.voidsetViewSharedData(ViewSharedData viewSharedData) The setViewSharedData function is used to set the viewSharedData variable in this class.voidThe updateScoreBoardPage function is called when the game ends.
-
Constructor Details
-
EndGameController
public EndGameController()The EndGameController function is a constructor that initializes the EndGameController class.
-
-
Method Details
-
initializeLabels
public void initializeLabels()The initializeLabels function initializes the scoreBoardNames and scoreBoardScores ArrayLists. The initializeLabels function also adds the labels for each player's name and score to their respective ArrayList. -
updateScoreBoardPage
public void updateScoreBoardPage()The updateScoreBoardPage function is called when the game ends. It updates the score board page with all the players' names and scores, sorted by highest to lowest score. If there are less than 4 players, then it will leave some of the fields blank. The winner's name is also displayed on this page as well.
-