Package card.energy

Class EnergyCard

java.lang.Object
card.Card
card.energy.EnergyCard
Direct Known Subclasses:
DoubleColorlessEnergy, FightingEnergy, FireEnergy, GrassEnergy, LightningEnergy, PsychicEnergy, WaterEnergy

public class EnergyCard extends Card
This class represents an Energy card in the Pokémon Trading Card Game. It extends the Card class and provides methods to get the type and value of the energy card.
Version:
1.0
Author:
Tyler Mong
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    The type of the Energy card (e.g., "Fire", "Water").
    private int
    The value of the Energy card (e.g., 1 for basic energy, 2 for double energy).
  • Constructor Summary

    Constructors
    Constructor
    Description
    EnergyCard(String name, String energyType, int energyValue)
    Constructor to initialize an Energy card with a name, energy type, and energy value.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the Energy card.
    Returns the type of the Energy card.

    Methods inherited from class card.Card

    getName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • energyType

      private String energyType
      The type of the Energy card (e.g., "Fire", "Water").
    • energyValue

      private int energyValue
      The value of the Energy card (e.g., 1 for basic energy, 2 for double energy).
  • Constructor Details

    • EnergyCard

      public EnergyCard(String name, String energyType, int energyValue)
      Constructor to initialize an Energy card with a name, energy type, and energy value. This constructor is called by the subclasses to create a new Energy card.
      Parameters:
      name - The name of the Energy card.
      energyType - The type of energy (e.g., "Fire", "Water").
      energyValue - The value of the energy (e.g., 1 for basic energy, 2 for double energy).
  • Method Details

    • getType

      public String getType()
      Returns the type of the Energy card.
      Overrides:
      getType in class Card
      Returns:
      The type of the Energy card (e.g., "Fire", "Water").
    • energyValue

      public int energyValue()
      Returns the value of the Energy card.
      Returns:
      The value of the Energy card (e.g., 1 for basic energy, 2 for double energy).