Package pile.piles

Class Hand

java.lang.Object
pile.Pile
pile.piles.Hand

public class Hand extends Pile
Represents the player's hand in the Pokémon Trading Card Game, where the player holds their cards. This class extends the Pile class and provides methods for managing the player's hand, such as playing a card and checking for basic Pokémon.
Version:
1.0
Author:
Tyler Mong
  • Constructor Details

    • Hand

      public Hand()
      Constructor for the Hand class. Initializes the player's hand.
  • Method Details

    • playCard

      public Card playCard(Card card)
      Plays a card from the player's hand and removes it from the hand.
      Parameters:
      card - The card to be played.
      Returns:
      The played card.
    • hasBasicPokemon

      public boolean hasBasicPokemon()
      Checks if the player's hand contains any basic Pokémon cards. This is used in the game setup to check for a Mulligan.
      Returns:
      True if there are basic Pokémon cards, false otherwise.