Class SceneController

java.lang.Object
it.polimi.ingsw.view.gui.SceneController

public class SceneController
extends java.lang.Object
Used to manages GUI's stages loading fxml files and conserve their root controllers (Note that only one stage will be active at a time)
  • Constructor Details

    • SceneController

      public SceneController​(Client client)
  • Method Details

    • start

      public void start​(javafx.stage.Stage stage)
      Initialize the first stage and ask the user for server connection
    • loadLogin

      public void loadLogin()
      Ask the user to insert username and gameID (using the current stage)
    • loadLobby

      public void loadLobby()
      Show a loading screen waiting for other players connection (using the current stage)
    • loadNumberOfPlayer

      public void loadNumberOfPlayer()
      Ask the user to insert the number of player of the game (using the current stage)
    • loadGameboard

      public void loadGameboard()
      Load the game board (closing the current stage and show in a new stage)
    • loadEndGameWin

      public void loadEndGameWin()
      Display victory (using the current stage)
    • loadEndGameLose

      public void loadEndGameLose()
      Display lost (using the current stage)
    • getConnectionController

      public ConnectionController getConnectionController()
    • getLoginController

      public LoginController getLoginController()
    • getNumberOfPlayersController

      public NumberOfPlayersController getNumberOfPlayersController()
    • getGameboardController

      public GameboardController getGameboardController()
    • getEndGameController

      public EndGameController getEndGameController()
    • fatalError

      public void fatalError​(java.lang.String error)