-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathShop.h
39 lines (34 loc) · 899 Bytes
/
Shop.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <algorithm>
#include <ctime>
#include <future>
#include <thread>
#include "Cards.h"
class Player;
class Shop
{
private:
// Shop is managing the cards tp buy
std::vector<std::unique_ptr<Card>> m_deck;
// Calculate number of gold to give to the player base on number of turns
unsigned int calculateGold(unsigned int turns) const;
public:
Shop()
{
createDeck();
shuffleDeck();
}
~Shop() {
m_deck.clear();
}
void createDeck();
// Shuffle the deck of cards
void shuffleDeck();
// Draw 3 cards from the deck
void giveChoice(Player &player);
void giveAnotherChoice(Player &player);
void giveCardToPlayer(Player &player, Card &card);
void sellCard(std::unique_ptr<Card> &card, Player *player);
// Give gold to the player
void giveGold(Player &player, unsigned int turns) const;
};