Class LobbyController

java.lang.Object
View.bookscrabbleapp.LobbyController
All Implemented Interfaces:
Observer, javafx.fxml.Initializable

public class LobbyController extends Object implements javafx.fxml.Initializable, Observer
  • Constructor Details

    • LobbyController

      public LobbyController()
  • Method Details

    • startGame

      public void startGame(javafx.scene.input.MouseEvent mouseEvent)
      Parameters:
      mouseEvent - when click on join game or create game it start the game
    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      method that call all the function that needed to run when the page load
      Specified by:
      initialize in interface javafx.fxml.Initializable
      Parameters:
      url -
      resourceBundle -
    • handlerPlayerList

      public void handlerPlayerList()
      create the list of the players that connected with their names
    • moveToLoginScene

      public void moveToLoginScene()
      method that - when the player click on the button backToLogin it will go to the login page
    • moveInGameScene

      public void moveInGameScene()
      when the host click on the button start game it will move all the players into the IngGme page
    • quitBtnHandler

      public void quitBtnHandler()
    • update

      public void update(Observable o, Object arg)
      update the guests that we need to move to game page and moves them all or update the guests player list.
      Specified by:
      update in interface Observer
      Parameters:
      o - the observable object.
      arg - an argument passed to the notifyObservers method.