Package card.energy
Class EnergyCard
java.lang.Object
card.Card
card.energy.EnergyCard
- Direct Known Subclasses:
DoubleColorlessEnergy
,FightingEnergy
,FireEnergy
,GrassEnergy
,LightningEnergy
,PsychicEnergy
,WaterEnergy
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
FieldsModifier and TypeFieldDescriptionprivate 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
ConstructorsConstructorDescriptionEnergyCard
(String name, String energyType, int energyValue) Constructor to initialize an Energy card with a name, energy type, and energy value. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of the Energy card.getType()
Returns the type of the Energy card.
-
Field Details
-
energyType
The type of the Energy card (e.g., "Fire", "Water"). -
energyValue
private int energyValueThe value of the Energy card (e.g., 1 for basic energy, 2 for double energy).
-
-
Constructor Details
-
EnergyCard
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
Returns the type of the Energy card. -
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).
-