-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApril.h
75 lines (63 loc) · 867 Bytes
/
April.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
class April
{
private:
int life;
string code;
//string notes;
bool death;
int level;
//Backpack bp;
public:
April()
{
life = 20;
death = false;
level = 1;
code = "none";
}
void setLife(int l)
{
life = l;
}
void setLevel(int le)
{
level = le;
}
void addLevel(int n)
{
level = level+n;
}
void levelUp()
{
//level= level+1;
addLevel(1);
}
void killapril()
{
death = true;
}
void takeLife(int n)
{
life = life-n;
if(life<=0)
{
killapril();
}
}
void setcode(string c)
{
code = c;
}
string getcode()
{
return code;
}
int getLife()
{
return life;
}
int getLevel()
{
return level;
}
};