33 DeckPlayer(std::vector<DeckEntry> startingCardList,
int maxCardNumbers = 20);
56 bool addCard(std::string_view cardId);
68 const std::vector<DeckEntry>&
getCardList()
const {
return m_cardsList; }
71 int m_maxCardNumber{};
72 int m_minCardNumber{5};
73 std::vector<DeckEntry> m_cardsList{};
Represents the player's persistent deck outside of combat.
Definition: deckPlayer.h:23
friend std::ostream & operator<<(std::ostream &out, const DeckPlayer &deck)
Outputs the deck contents to an output stream.
Definition: deckPlayer.cpp:11
bool isCardPresent(std::string_view cardId) const
Checks if a card ID is present in the deck.
Definition: deckPlayer.cpp:34
const std::vector< DeckEntry > & getCardList() const
Returns the full list of card entries.
Definition: deckPlayer.h:68
int getCurrentCardNumber() const
Returns the total number of cards (sum of all counts).
Definition: deckPlayer.cpp:23
DeckPlayer()
Constructs an empty deck.
Definition: deckPlayer.h:26
bool removeCard(std::string_view cardId)
Removes one copy of a card, if above minimum size.
Definition: deckPlayer.cpp:64
bool addCard(std::string_view cardId)
Adds a card to the deck, if below max size.
Definition: deckPlayer.cpp:42