Package View

Class WaitingPageController

java.lang.Object
View.WaitingPageController
All Implemented Interfaces:
Observer

public class WaitingPageController extends Object implements Observer
  • Constructor Details

    • WaitingPageController

      public WaitingPageController()
  • Method Details

    • setStage

      public void setStage(javafx.stage.Stage stage)
    • setViewModel

      public void setViewModel(ScrabbleViewModel vm)
      The setViewModel function is used to set the view model for this class.
      Parameters:
      vm - Bind the disconnect property to the view model's disconnect property
    • startGame

      public void startGame() throws IOException
      The startGame function is called when the user clicks on the "Start Game" button. It calls a function in ViewModel to start the game, and then swaps scenes to display the game board.
      Throws:
      IOException
    • setIsHost

      public void setIsHost(boolean isHost)
      The setIsHost function sets the host variable to true or false.
      Parameters:
      isHost - Set the host variable to true or false
    • update

      public void update(Observable o, Object arg)
      Specified by:
      update in interface Observer