Class GameDeck

java.lang.Object
net.demilich.metastone.game.decks.GameDeck
All Implemented Interfaces:
Serializable, Cloneable, Deck

public class GameDeck extends Object implements Serializable, Cloneable, Deck
A deck that contains cards, a name, a hero card, etc. that can be actually used to populate a player's deck in a GameContext.

Create an instance of this class and add cards using getCards()'s CardList.addCard(String) method. Set the hero class using setHeroClass(String). Set the format using setFormat(DeckFormat). This format should correspond to the one the GameContext.getDeckFormat() uses.

See Also:
  • Field Details

    • EMPTY

      public static final GameDeck EMPTY
    • deckId

      protected String deckId
    • cards

      protected CardList cards
  • Constructor Details

    • GameDeck

      public GameDeck()
    • GameDeck

      public GameDeck(String heroClass)
    • GameDeck

      public GameDeck(String heroClass, boolean arbitrary)
    • GameDeck

      public GameDeck(String heroClass1, List<String> cardIds1)
  • Method Details

    • containsHowMany

      public int containsHowMany(Card card)
    • getCards

      public CardList getCards()
    • getCardsCopy

      public CardList getCardsCopy()
    • getDescription

      public String getDescription()
    • getHeroClass

      public String getHeroClass()
    • getName

      public String getName()
    • isComplete

      public boolean isComplete()
    • isFull

      public boolean isFull()
    • setDescription

      public void setDescription(String description)
    • setName

      public void setName(String name)
    • setHeroClass

      public void setHeroClass(String heroClass)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getHeroCard

      public Card getHeroCard()
    • setHeroCard

      public void setHeroCard(Card heroCard)
    • getFormat

      public DeckFormat getFormat()
    • setFormat

      public void setFormat(DeckFormat format)
    • clone

      public Deck clone()
      Specified by:
      clone in interface Deck
      Overrides:
      clone in class Object
    • getDeckId

      public String getDeckId()
      Specified by:
      getDeckId in interface Deck
    • setDeckId

      public Deck setDeckId(String deckId)
    • setCards

      public Deck setCards(CardList cards)
    • getPlayerAttributes

      public AttributeMap getPlayerAttributes()
    • setPlayerAttributes

      public GameDeck setPlayerAttributes(AttributeMap playerAttributes)