java.lang.Object
View.GameOverPageController
-
Constructor Summary
ConstructorsConstructorDescriptionThe GameOverPageController function is the controller for the GameOverPage.fxml file. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe leaveGame function is called when the user clicks on the "Leave Game" button.voidsetPlayersList(javafx.collections.ObservableList<String> list) The setPlayersList function takes in an ObservableList of Strings and sets the playersList variable to that list.voidsetStage(javafx.stage.Stage stage) The setStage function is used to set the stage of the application.voidThe setVm function is used to set the ScrabbleViewModel object that will be used by this class.
-
Constructor Details
-
GameOverPageController
The GameOverPageController function is the controller for the GameOverPage.fxml file. It allows for a user to return to the main menu, or exit out of the game entirely.- Throws:
IOException
-
-
Method Details
-
leaveGame
The leaveGame function is called when the user clicks on the "Leave Game" button. It returns to the main menu scene and sets it to full screen.- Throws:
IOException
-
setStage
public void setStage(javafx.stage.Stage stage) The setStage function is used to set the stage of the application.- Parameters:
stage- Set the stage
-
setVm
The setVm function is used to set the ScrabbleViewModel object that will be used by this class.- Parameters:
vm- Set the vm variable to the one that was passed in
-
setPlayersList
The setPlayersList function takes in an ObservableList of Strings and sets the playersList variable to that list. It then sorts the list by score, with highest scores first.- Parameters:
list- Set the playerslist observablelist
-