Package game
Class Player
java.lang.Object
game.Player
This class represents a player in the Pokémon Trading Card Game.
It contains the player's name, deck, hand, active Pokémon, benched Pokémon, prize cards, and discard pile.
It provides methods to access and modify these attributes.
- Version:
- 1.0
- Author:
- Tyler Mong
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Active
The player's active Pokémon.private Bench
The player's benched Pokémon.private Deck
The player's deck of cards.private DiscardPile
The player's discard pile.private Hand
The player's hand of cards.private String
The name of the player.private Prize
The player's prize cards. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the player's active Pokémon.getBench()
Returns the player's benched Pokémon.getDeck()
Returns the player's deck.Returns the player's discard pile.getHand()
Returns the player's hand.getName()
Returns the player's name.Returns the player's prize cards.void
Sets the player's deck.
-
Field Details
-
name
The name of the player. -
deck
The player's deck of cards. -
hand
The player's hand of cards. -
active
The player's active Pokémon. -
bench
The player's benched Pokémon. -
prizeCards
The player's prize cards. -
discardPile
The player's discard pile.
-
-
Constructor Details
-
Player
Constructor to initialize a player with a name and card piles.- Parameters:
name
- The name of the player.
-
-
Method Details
-
getName
Returns the player's name.- Returns:
- The player's name.
-
getDeck
Returns the player's deck.- Returns:
- The player's deck.
-
setDeck
Sets the player's deck.- Parameters:
deck
- The deck to set for the player.
-
getHand
Returns the player's hand.- Returns:
- The player's hand.
-
getPrizeCards
Returns the player's prize cards.- Returns:
- The player's prize cards.
-
getDiscardPile
Returns the player's discard pile.- Returns:
- The player's discard pile.
-
getActive
Returns the player's active Pokémon.- Returns:
- The player's active Pokémon.
-
getBench
Returns the player's benched Pokémon.- Returns:
- The player's benched Pokémon.
-