-
Notifications
You must be signed in to change notification settings - Fork 0
/
powers.h
98 lines (89 loc) · 1.33 KB
/
powers.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#include <string>
#include <iostream>
#include <fstream>
#include "StrLib.h"
using namespace std;
//integers
const int C_FLIGHT = 1;
const int C_GADGETS = 2;
const int C_INTELLIGENCE = 3;
const int C_LASER = 4;
const int C_NATIONALISM = 5;
const int C_STRENGTH = 6;
//abstract power class
class Powers
{
protected:
string mDescription = "";
public:
string getDescription();
virtual int getID() = 0;
virtual void use() = 0;
virtual int fight(Powers*) = 0;
};
class Flight : public Powers
{
public:
Flight()
{
mDescription = "flight";
}
int getID();
void use();
int fight(Powers* opponent);
};
class Gadgets : public Powers
{
public:
Gadgets()
{
mDescription = "gadgets";
}
int getID();
void use();
int fight(Powers* opponent);
};
class Intelligence : public Powers
{
public:
Intelligence()
{
mDescription = "intelligence";
}
int getID();
void use();
int fight(Powers* opponent);
};
class Laser : public Powers
{
public:
Laser()
{
mDescription = "laser";
}
int getID();
void use();
int fight(Powers* opponent);
};
class Nationalism : public Powers
{
public:
Nationalism()
{
mDescription = "nationalism";
}
int getID();
void use();
int fight(Powers* opponent);
};
class Strength : public Powers
{
public:
Strength()
{
mDescription = "strength";
}
int getID();
void use();
int fight(Powers* opponent);
};