Class SimpleGameState

java.lang.Object
it.polimi.ingsw.view.SimpleGameState

public class SimpleGameState
extends java.lang.Object
Class containing a simplified version of the game state. Contains the state of the market and the state of the DevelopCard Deck. It also contains Lorenzo's position.
  • Constructor Details

    • SimpleGameState

      public SimpleGameState()
      Constructor for SimpleGameState class
  • Method Details

    • constructDeck

      public void constructDeck​(DevelopCardDeckSetup stateSetup)
      Setups the DevelopCard Deck
      Parameters:
      stateSetup - , setup content
    • constructMarket

      public void constructMarket​(MarketSetup stateSetup)
      Setups the market
      Parameters:
      stateSetup - , setup content
    • updateDeck

      public void updateDeck​(DevelopCardDeckUpdate stateUpdate)
      Updates the DevelopCard Deck
      Parameters:
      stateUpdate - , update content
    • updateMarket

      public void updateMarket​(MarketUpdate stateUpdate)
      Updates the market
      Parameters:
      stateUpdate - , update content
    • setTempMarble

      public void setTempMarble​(boolean row, int index)
      Sets into tempMarble list the marbles player got from the market
      Parameters:
      row - , true to take marbles from a row, false to take marbles from a column
      index - , index of the row/column from which take the marbles
    • removeTempMarble

      public void removeTempMarble​(int marbleIndex)
      Discards by index the marble passed as parameter from the tempMarble list
      Parameters:
      marbleIndex - , index of the marble to discard
    • updateLorenzoPosition

      public void updateLorenzoPosition​(int lorenzoTrackPosition)
      Updates Lorenzo's track position
      Parameters:
      lorenzoTrackPosition - , updated position of Lorenzo
    • getMarket

      public MarbleColor[][] getMarket()
    • getSlide

      public MarbleColor getSlide()
    • getTempMarble

      public java.util.List<MarbleColor> getTempMarble()
    • getLorenzoTrackPosition

      public int getLorenzoTrackPosition()
    • visibleCards

      public java.lang.Integer[][] visibleCards()
      Returns visible cards (the ones on top of the card square)
      Returns:
      a matrix of DevelopCard