Deck.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_HPP
8 #define ROSETTASTONE_DECK_HPP
9 
12 
13 #include <array>
14 
15 namespace RosettaStone
16 {
25 class Deck
26 {
27  public:
29  Deck();
30 
33  Player& GetOwner() const;
34 
37  void SetOwner(Player& owner);
38 
41  bool IsEmpty() const;
42 
45  std::size_t GetNumOfCards() const;
46 
49  Entity* GetTopCard() const;
50 
53  void AddCard(Entity& card);
54 
58  Entity& RemoveCard(Entity& card);
59 
61  void Shuffle();
62 
63  private:
64  Player* m_owner = nullptr;
65 
66  std::array<Entity*, MAX_DECK_SIZE> m_cards{};
67  std::size_t m_numCard = 0;
68 };
69 } // namespace RosettaStone
70 
71 #endif // ROSETTASTONE_DECK_HPP
Deck()
Default constructor.
std::size_t GetNumOfCards() const
Deck class.
Definition: Deck.hpp:25
void SetOwner(Player &owner)
Abstract entity structure that stores card data.
Definition: Entity.hpp:28
Entity & RemoveCard(Entity &card)
void AddCard(Entity &card)
Player & GetOwner() const
void Shuffle()
Shuffles cards in deck.
Player class.
Definition: Player.hpp:33
Definition: AccountInfo.hpp:14
bool IsEmpty() const
Entity * GetTopCard() const