Package it.polimi.ingsw.view
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 Summary
Constructors Constructor Description SimpleGameState()Constructor for SimpleGameState class -
Method Summary
Modifier and Type Method Description voidconstructDeck(DevelopCardDeckSetup stateSetup)Setups the DevelopCard DeckvoidconstructMarket(MarketSetup stateSetup)Setups the marketintgetLorenzoTrackPosition()MarbleColor[][]getMarket()MarbleColorgetSlide()java.util.List<MarbleColor>getTempMarble()voidremoveTempMarble(int marbleIndex)Discards by index the marble passed as parameter from the tempMarble listvoidsetTempMarble(boolean row, int index)Sets into tempMarble list the marbles player got from the marketvoidupdateDeck(DevelopCardDeckUpdate stateUpdate)Updates the DevelopCard DeckvoidupdateLorenzoPosition(int lorenzoTrackPosition)Updates Lorenzo's track positionvoidupdateMarket(MarketUpdate stateUpdate)Updates the marketjava.lang.Integer[][]visibleCards()Returns visible cards (the ones on top of the card square)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SimpleGameState
public SimpleGameState()Constructor for SimpleGameState class
-
-
Method Details
-
constructDeck
Setups the DevelopCard Deck- Parameters:
stateSetup- , setup content
-
constructMarket
Setups the market- Parameters:
stateSetup- , setup content
-
updateDeck
Updates the DevelopCard Deck- Parameters:
stateUpdate- , update content
-
updateMarket
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 columnindex- , 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
-
getSlide
-
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
-