Package View

Class GameOverPageController

java.lang.Object
View.GameOverPageController

public class GameOverPageController extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    The GameOverPageController function is the controller for the GameOverPage.fxml file.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The leaveGame function is called when the user clicks on the "Leave Game" button.
    void
    setPlayersList(javafx.collections.ObservableList<String> list)
    The setPlayersList function takes in an ObservableList of Strings and sets the playersList variable to that list.
    void
    setStage(javafx.stage.Stage stage)
    The setStage function is used to set the stage of the application.
    void
    The setVm function is used to set the ScrabbleViewModel object that will be used by this class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GameOverPageController

      public GameOverPageController() throws IOException
      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

      public void leaveGame() throws IOException
      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

      public void setVm(ScrabbleViewModel vm)
      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

      public void setPlayersList(javafx.collections.ObservableList<String> list)
      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