Class DiscardToken

java.lang.Object
it.polimi.ingsw.model.singleplayer.DiscardToken
All Implemented Interfaces:
ActionToken

public class DiscardToken
extends java.lang.Object
implements ActionToken
Represents Lorenzo's action tokens that discard two development cards of the same color in a single player game
  • Constructor Summary

    Constructors
    Constructor Description
    DiscardToken​(DevelopCardColor color)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    void useToken​(java.util.List<ActionToken> tokens, LorenzoTrack trackLorenzo, DevelopCardDeck deck)
    Perform the token action: discard two development cards of the same color

    Methods inherited from class java.lang.Object

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

  • Method Details

    • useToken

      public void useToken​(java.util.List<ActionToken> tokens, LorenzoTrack trackLorenzo, DevelopCardDeck deck)
      Perform the token action: discard two development cards of the same color
      Specified by:
      useToken in interface ActionToken
      Parameters:
      tokens - this parameter will be ignored in this type of token
      trackLorenzo - this parameter will be ignored in this type of token
      deck - the development cards' deck in which cards must be removed
    • equals

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