Class GameboardController

java.lang.Object
it.polimi.ingsw.view.gui.controllers.GUIController
it.polimi.ingsw.view.gui.controllers.GameboardController

public class GameboardController
extends GUIController
Java controller of the gameboard.fxml file
  • Field Summary

    Fields inherited from class it.polimi.ingsw.view.gui.controllers.GUIController

    client
  • Constructor Summary

    Constructors
    Constructor Description
    GameboardController()  
  • Method Summary

    Modifier and Type Method Description
    void askLeaderOnWHite​(java.lang.String username)
    Ask the player which leader card must be used to convert a white marble
    void constructDeck​(DevelopCardDeckSetup stateSetup)
    Construct the gui's develop card deck
    void constructMarket​(MarketSetup stateUpdate)
    Construct the GUI's market
    void displayInitialResourcesChoice​(java.lang.String username)
    Display the tmp marbles bought form market
    void displayLeaderChoiceLable​(java.lang.String username)
    Ask the player to discard two leader card during setup
    void enableFinalAction()
    Set disabled all the correct component for the final phase
    void enableInitialAction()
    Set disabled all the correct component for the initial phase
    void enableProductionAction()
    Set disabled all the correct component for the producing phase
    void enableShoppingAction()
    Set disabled all the correct component for the shopping phase
    PlayerboardController getPlayerBoardController​(java.lang.String username)  
    void leaderSetup​(java.lang.String username, LeaderSetup stateUpdate)
    Display leader cards during setup
    void otherPlayerTurn​(java.lang.String username)
    Set disabled all the correct component during an other player turn
    void setErrorLable​(java.lang.String lableText)
    Display and error
    void setLorenzoToken​(javafx.scene.image.Image image)
    Set the last lorenzo token image
    void setOtherPlayer​(java.util.List<java.lang.String> players)
    Create the player boards of the other players loading the fxml files and saving their controller
    void setTempMarbleVisible()  
    void setupLorenzo()
    Set the last token and the black cross visible
    void setUsername​(java.lang.String username)
    Set player username and create their personal player board loading the correct fxml file and saving its controller
    void updateDeck​(DevelopCardDeckUpdate stateUpdate)
    Display a deck update: a player bought a card
    void updateMarket​(MarketUpdate stateUpdate)
    Display a market update when you are the player who bought from the market and show the tmp marble to insert them into warehouse
    void updateMarketOtherPlayers​(MarketUpdate stateUpdate)
    Display a market update when another player bought a row or a column

    Methods inherited from class it.polimi.ingsw.view.gui.controllers.GUIController

    setClient

    Methods inherited from class java.lang.Object

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

    • GameboardController

      public GameboardController()
  • Method Details

    • constructDeck

      public void constructDeck​(DevelopCardDeckSetup stateSetup)
      Construct the gui's develop card deck
      Parameters:
      stateSetup - the state of the develop card deck
    • updateDeck

      public void updateDeck​(DevelopCardDeckUpdate stateUpdate)
      Display a deck update: a player bought a card
      Parameters:
      stateUpdate - the update object of the develop card deck
    • setUsername

      public void setUsername​(java.lang.String username)
      Set player username and create their personal player board loading the correct fxml file and saving its controller
      Parameters:
      username - player's username
    • setOtherPlayer

      public void setOtherPlayer​(java.util.List<java.lang.String> players)
      Create the player boards of the other players loading the fxml files and saving their controller
      Parameters:
      players - other player usernames list
    • setupLorenzo

      public void setupLorenzo()
      Set the last token and the black cross visible
    • setLorenzoToken

      public void setLorenzoToken​(javafx.scene.image.Image image)
      Set the last lorenzo token image
      Parameters:
      image - the image of the last token
    • getPlayerBoardController

      public PlayerboardController getPlayerBoardController​(java.lang.String username)
      Parameters:
      username - username of the user of which return the controller
      Returns:
      the player board controller of the specified user
    • leaderSetup

      public void leaderSetup​(java.lang.String username, LeaderSetup stateUpdate)
      Display leader cards during setup
      Parameters:
      username - username of the player
      stateUpdate - the leader update containing the leader cards to display
    • constructMarket

      public void constructMarket​(MarketSetup stateUpdate)
      Construct the GUI's market
      Parameters:
      stateUpdate - the model update representing the initial market
    • updateMarket

      public void updateMarket​(MarketUpdate stateUpdate)
      Display a market update when you are the player who bought from the market and show the tmp marble to insert them into warehouse
      Parameters:
      stateUpdate - the model update representing the market update
    • updateMarketOtherPlayers

      public void updateMarketOtherPlayers​(MarketUpdate stateUpdate)
      Display a market update when another player bought a row or a column
      Parameters:
      stateUpdate - the model update representing the market update
    • askLeaderOnWHite

      public void askLeaderOnWHite​(java.lang.String username)
      Ask the player which leader card must be used to convert a white marble
      Parameters:
      username - username of this user
    • displayInitialResourcesChoice

      public void displayInitialResourcesChoice​(java.lang.String username)
      Display the tmp marbles bought form market
      Parameters:
      username - the player who bought from market
    • displayLeaderChoiceLable

      public void displayLeaderChoiceLable​(java.lang.String username)
      Ask the player to discard two leader card during setup
      Parameters:
      username - the player username
    • enableInitialAction

      public void enableInitialAction()
      Set disabled all the correct component for the initial phase
    • otherPlayerTurn

      public void otherPlayerTurn​(java.lang.String username)
      Set disabled all the correct component during an other player turn
    • enableFinalAction

      public void enableFinalAction()
      Set disabled all the correct component for the final phase
    • enableProductionAction

      public void enableProductionAction()
      Set disabled all the correct component for the producing phase
    • enableShoppingAction

      public void enableShoppingAction()
      Set disabled all the correct component for the shopping phase
    • setErrorLable

      public void setErrorLable​(java.lang.String lableText)
      Display and error
      Parameters:
      lableText - error message
    • setTempMarbleVisible

      public void setTempMarbleVisible()