Package card.trainer

Class TrainerCard

java.lang.Object
card.Card
card.trainer.TrainerCard
Direct Known Subclasses:
Bill, ProfessorOak

public abstract class TrainerCard extends Card
This class represents a Trainer card in the Pokémon Trading Card Game. It extends the Card class and provides methods to get the description of the card and use its effect. It is an abstract class that serves as a base for specific trainer cards.
Version:
1.0
Author:
Tyler Mong
  • Field Details

    • description

      private String description
  • Constructor Details

    • TrainerCard

      public TrainerCard(String name, String description)
      Constructor to initialize a trainer card with a name and description. This constructor is called by the subclasses to create a new trainer card.
      Parameters:
      name - The name of the trainer card.
      description - The description of the trainer card, explaining its effect.
  • Method Details

    • getDescription

      public String getDescription()
      Returns the description of the trainer card.
      Returns:
      The description of the trainer card, explaining its effect.
    • useEffect

      public abstract void useEffect(Deck deck, Hand hand, DiscardPile discardPile)
      Abstract method to use the effect of the trainer card.
      Parameters:
      deck - The player's deck.
      hand - The player's hand.
      discardPile - The player's discard pile (null if not applicable).
    • useEffect

      public void useEffect(Deck deck, Hand hand)
      Overloaded method to use the effect of the trainer card without a discard pile. This method calls the abstract useEffect method with a null discard pile.
      Parameters:
      deck - The player's deck.
      hand - The player's hand.