Class ShuffleToken

java.lang.Object
it.polimi.ingsw.model.singleplayer.ShuffleToken
All Implemented Interfaces:
TokenShuffleObservable, ActionToken

public class ShuffleToken
extends java.lang.Object
implements ActionToken, TokenShuffleObservable
Represents Lorenzo's action tokens that shuffle action token's deck and move foreword of one position Lorenzo's faith marker in a single player game
  • Constructor Summary

    Constructors
    Constructor Description
    ShuffleToken()  
    ShuffleToken​(ModelObserver controller)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    void notifyTokenShuffle()
    Notify the model observers that an element has been added to the temporary chest
    void useToken​(java.util.List<ActionToken> tokens, LorenzoTrack trackLorenzo, DevelopCardDeck deck)
    Perform the token action: shuffle the token's deck and move foreword of one position Lorenzo's faith marker

    Methods inherited from class java.lang.Object

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

    • ShuffleToken

      public ShuffleToken()
    • ShuffleToken

      public ShuffleToken​(ModelObserver controller)
  • Method Details

    • useToken

      public void useToken​(java.util.List<ActionToken> tokens, LorenzoTrack trackLorenzo, DevelopCardDeck deck)
      Perform the token action: shuffle the token's deck and move foreword of one position Lorenzo's faith marker
      Specified by:
      useToken in interface ActionToken
      Parameters:
      tokens - the token's deck to shuffle
      trackLorenzo - Lorenzo's track Lorenzo's track used to move foreword Lorenzo's faith marker
      deck - this parameter will be ignored in this type of token
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • notifyTokenShuffle

      public void notifyTokenShuffle()
      Description copied from interface: TokenShuffleObservable
      Notify the model observers that an element has been added to the temporary chest
      Specified by:
      notifyTokenShuffle in interface TokenShuffleObservable