-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.h
59 lines (52 loc) · 1.34 KB
/
Card.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// Created by Main on 2021-09-29.
//
#ifndef COMP_345_PROJ_CARD_H
#define COMP_345_PROJ_CARD_H
#include <vector>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include "Orders.h"
using namespace std;
class Hand;
//creating all functions and constructors
class Card {
public:
string cardType;
Card();
Card(string type);
Card(Card const ©Card);
string getType() const;
friend ostream & operator << (ostream &out, const Card &c);
Card& operator =(const Card &c);
};
class Deck {
public:
std::vector<Card*> cardsHeld;
Deck();
Deck(int numPlayers);
Deck(Deck const ©Deck);
~Deck();
void ReceiveCard(Card *c);
void Draw(Hand *playerHand);
friend ostream & operator << (ostream &out, const Deck &showDeck);
Deck& operator =(const Deck &d);
};
class Hand {
public:
std::vector<Card*> cardsHeld;
Hand();
Hand(vector<Card*> cardsHeld);
Hand(const Hand ©Hand);
~Hand();
void ReceiveCard(Card *c);
int getCardIndex(string playerCardType);
void removeCard(int index);
bool isCardOwned(string playerCardType);
OrdersList Play(Deck *mainDeck, OrdersList *o);
friend ostream & operator << (ostream &out, const Hand &showHand);
Hand& operator = (const Hand &h);
};
#endif //COMP_345_PROJ_CARD_H