-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCardsDriver.cpp
57 lines (45 loc) · 1.33 KB
/
CardsDriver.cpp
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
#include "stdafx.h"
#include<iostream>
#include "Cards.h"
using namespace std;
/*
int main() {
// create new deck object
// deck object contains both a vector for the deck and a vector for the hand
Deck* newDeck = new Deck();
cout << " Cards in the deck : " << endl << endl;
for (int i = 0; i < newDeck->deckOfCard.size(); i++) {
cout << newDeck->deckOfCard[i]->action + " " + newDeck->deckOfCard[i]->good << endl;
}
cout << endl;
cout << "the number of cards in the deck are " << newDeck->deckOfCard.size();
cout << endl;
// card are drawn from the deck and put into the hand
newDeck->draw();
newDeck->draw();
newDeck->draw();
newDeck->draw();
newDeck->draw();
newDeck->draw();
cout << " Cards in the hand : " << endl << endl;
for (int i = 0; i < newDeck->hand.size(); i++)
{
cout << newDeck->hand[i]->action + " " + newDeck->hand[i]->good << endl;
}
cout << endl;
cout << " Cards in the deck : " << endl << endl;
for (int i = 0; i < newDeck->deckOfCard.size(); i++) {
cout << newDeck->deckOfCard[i]->action + " " + newDeck->deckOfCard[i]->good << endl;
}
cout << endl;
cout << "The new number of cards in the deck are " << newDeck->deckOfCard.size();
cout << endl;
Hand* x = new Hand(newDeck);
int temp;
x->exchange(2);
while (true) {
cin >> temp;
cout << to_string(x->getCostCard(temp)) << endl;
}
}
*/