81 void discard(std::unique_ptr<CardInstance> exhaustedCard);
106 std::vector<std::unique_ptr<CardInstance>>&
getHandPile() {
return m_handPile; }
113 std::vector<const CardInstance*>
getHandView()
const;
120 std::vector<std::unique_ptr<CardInstance>> m_drawPile;
121 std::vector<std::unique_ptr<CardInstance>> m_handPile;
122 std::vector<std::unique_ptr<CardInstance>> m_discardPile;
133 void populateDeck(
const std::vector<DeckEntry>& cardList);
Represents a runtime instance of a card during combat.
Definition: cardInstance.h:21
Manages all card piles during a single combat.
Definition: deckCombat.h:38
std::unique_ptr< CardInstance > takeFromHand(int index)
Removes a card from the hand and transfers ownership to the caller.
Definition: deckCombat.cpp:81
std::vector< std::unique_ptr< CardInstance > > & getHandPile()
Returns a reference to the current hand pile.
Definition: deckCombat.h:106
void discardFromHand(int handIndex)
Discards a card from the hand to the discard pile.
Definition: deckCombat.cpp:107
void shuffle()
Definition: deckCombat.cpp:143
void regenerateDeck()
Definition: deckCombat.cpp:145
int getHandSize() const
Returns the number of cards currently in the hand.
Definition: deckCombat.h:70
void discardWholeHand()
Definition: deckCombat.cpp:122
void discard(std::unique_ptr< CardInstance > exhaustedCard)
Moves an exhausted/played card into the discard pile.
Definition: deckCombat.cpp:97
std::vector< const CardInstance * > getHandView() const
Returns a non-owning view of the current hand for UI rendering.
Definition: deckCombat.cpp:130
DrawData drawMultipleCards(int amount)
Definition: deckCombat.cpp:31
DrawResult drawCard()
Draws one card from the draw pile to the hand.
Definition: deckCombat.cpp:54
Represents the player's persistent deck outside of combat.
Definition: deckPlayer.h:23
Interface for card instance creation.
Definition: ICardFactory.h:17
Represents a single card entry in the player's persistent deck.
Definition: deckEntry.h:16
Definition: deckCombat.h:17
bool reshuffled
Definition: deckCombat.h:18
const CardInstance * cardDrawn
Definition: deckCombat.h:19