Package card

Class Card

java.lang.Object
card.Card
Direct Known Subclasses:
EnergyCard, PokemonCard, TrainerCard

public class Card extends Object
This class represents a generic card in the Pokémon Trading Card Game. It provides methods to get the card name and card type.
Version:
1.0
Author:
Tyler Mong
  • Field Details

  • Constructor Details

    • Card

      public Card(String name, String type)
      Constructor to initialize a card with a name and type. This constructor is called by the subclasses to create a new card.
      Parameters:
      name - The name of the card.
      type - The type of the card (e.g., Pokémon, Energy, Trainer).
  • Method Details

    • getName

      public String getName()
      Returns the name of the card.
      Returns:
      The name of the card.
    • getType

      public String getType()
      Returns the type of the card.
      Returns:
      The type of the card (e.g., Pokémon, Energy, Trainer).