Uses of Class
game.Player

Packages that use Player
Package
Description
This package contains the main game logic for the Pokémon Trading Card Game (TCG) emulation.
  • Uses of Player in game

    Fields in game declared as Player
    Modifier and Type
    Field
    Description
    private Player
    A reference to the current player whose turn it is.
    private Player
    A reference to the opponent player, who is not currently taking their turn.
    private Player
    Game.player1
    A reference to the first player in the game.
    private Player
    Game.player2
    A reference to the second player in the game.
    Methods in game with parameters of type Player
    Modifier and Type
    Method
    Description
    private void
    Game.addBenchPokemon(Player player)
    Sets the player's Benched Pokémon.
    private void
    Game.addPrizePokemon(Player player)
    Adds 6 cards to the player's Prize pile.
    private boolean
    Game.attachEnergy(Player currentPlayer)
    Handles attaching energy to a Pokémon.
    private void
    Game.handleBonusDraws(Player currentPlayer, int opponentMulliganCount)
    Handles the bonus draws for the current player based on the opponent's Mulligan count.
    private void
    Game.handleKnockout(Player currentPlayer, Player opponent)
    Handles the knockout of a Pokémon after an attack.
    private void
    Game.handleNoActivePokemon(Player currentPlayer)
    Handles the case of the current player having no Active Pokémon, at the end of their opponent's turn.
    private void
    Game.playTrainerCard(Player currentPlayer)
    Handles playing a Trainer card.
    private boolean
    Game.retreatActivePokemon(Player currentPlayer)
    Handles retreating the Active Pokémon to the Bench.
    private void
    Game.selectDeck(Player player)
    This method handles deck selection for each player.
    private void
    Game.setActivePokemon(Player player)
    Sets the player's Active Pokémon.
    private void
    Game.showCardStats(Player currentPlayer)
    Displays the stats of a selected Pokémon card.
    private int
    Game.validateHand(Player player)
    Checks if the player's hand contains any Basic Pokémon cards.