DeckInfo.hpp
Go to the documentation of this file.
1 // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
2 
3 // We are making my contributions/submissions to this project solely in our
4 // personal capacity and are not conveying any rights to any intellectual
5 // property of any third parties.
6 
7 #ifndef ROSETTASTONE_DECK_INFO_HPP
8 #define ROSETTASTONE_DECK_INFO_HPP
9 
10 #include <Rosetta/Cards/Card.hpp>
12 
13 #include <string>
14 
15 namespace RosettaStone
16 {
23 class DeckInfo
24 {
25  public:
27  DeckInfo();
28 
32  DeckInfo(std::string name, CardClass deckClass);
33 
36  std::string GetName() const;
37 
40  CardClass GetClass() const;
41 
44  std::size_t GetNumOfCards() const;
45 
48  std::size_t GetUniqueNumOfCards() const;
49 
53  std::size_t GetNumCardInDeck(std::string cardID);
54 
57  std::vector<Card> GetPrimitiveDeck() const;
58 
62  std::pair<std::string, std::size_t> GetCard(std::size_t idx) const;
63 
65  void ShowCardList() const;
66 
72  bool AddCard(std::string cardID, std::size_t numCardToAdd);
73 
79  bool DeleteCard(std::string cardID, std::size_t numCardToDelete);
80 
81  private:
82  std::string m_name;
83  CardClass m_class = CardClass::INVALID;
84 
85  std::size_t m_numOfCards = 0;
86  std::vector<std::pair<std::string, std::size_t>> m_cards;
87 };
88 } // namespace RosettaStone
89 
90 #endif // ROSETTASTONE_DECK_INFO_HPP
std::vector< Card > GetPrimitiveDeck() const
bool AddCard(std::string cardID, std::size_t numCardToAdd)
std::size_t GetNumOfCards() const
std::string GetName() const
std::pair< std::string, std::size_t > GetCard(std::size_t idx) const
CardClass GetClass() const
void ShowCardList() const
Prints card list in deck.
bool DeleteCard(std::string cardID, std::size_t numCardToDelete)
DeckInfo class.
Definition: DeckInfo.hpp:23
std::size_t GetNumCardInDeck(std::string cardID)
std::size_t GetUniqueNumOfCards() const
DeckInfo()
Default constructor.
Definition: AccountInfo.hpp:14