-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharmour.cpp
64 lines (49 loc) · 1.01 KB
/
armour.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
58
59
60
61
62
63
64
#include "armour.h"
armour::armour(void) {
setname("shirt");
settype(Body);
setprotect(0.0);
setlevel(1);
setweight(0);
setdurability(100);
}
void armour::remove() {
delete this;
}
std::string armour::getname() const {
return name_;
}
armour::armourtype armour::gettype() const {
return type_;
}
float armour::getprotect() const {
return protect_;
}
int armour::getlevel() const {
return level_;
}
int armour::getweight() const {
return weight_;
}
int armour::getdurability() const {
return durability_;
}
//////////////////////////////////////////////////////////////////////////
void armour::setname(std::string name) {
name_ = name;
}
void armour::settype(armourtype type) {
type_ = type;
}
void armour::setprotect(float protect) {
protect_ = protect;
}
void armour::setlevel(int level) {
level_ = level;
}
void armour::setweight(int weight) {
weight_ = weight;
}
void armour::setdurability(int durability) {
durability_ = durability;
}