-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGather.cpp
41 lines (39 loc) · 880 Bytes
/
Gather.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
#include "Gather.h"
template <class T>
Gather<T>::Gather();
template <class T>
Gather<T>::Gather(string typ, bool mainQuest, bool activeQuest, string nameThing, int howMuchNeed, int howMuchHave)
{
this->s = typ;
this->mainQuest = mainQuest;
this->active = activeQuest;
this->nameThing = nameThing;
this->howMuchNeed = howMuchNeed;
this->howMuchHave = howMuchHave;
}
template <class T>
Gather<T>::~Gather()
{
this->s = "";
this->mainQuest = false;
this->active = false;
this->nameThing = "";
this->howMuchNeed = -1;
this->howMuchHave = 0;
}
template <class T>
bool Gather<T>::comleteGather(bool uHaveIt, int howMuchHave, int howMuchNeed)
{
if (howMuchHave == howMuchNeed)
{
uHaveIt = true;
}
else
{
cout << "you still need: " << howMuchNeed - howMuchNeed << " x";
}
if (uHaveIt)
{
cout << "you have it :D";
}
}