-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcharacter.cpp
More file actions
68 lines (44 loc) · 1.54 KB
/
character.cpp
File metadata and controls
68 lines (44 loc) · 1.54 KB
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
// Class automatically generated by Dev-C++ New Class wizard
#include "character.h" // class's header file
// class constructor
Character::Character()
{
// insert your code here
}
// class destructor
Character::~Character()
{
// insert your code here
}
string Character::get_name()
{ return name;
}
//-----------------------------------------------------------------------------------------------
void Character::set_name(string _name)
{ name = _name;
}
//-----------------------------------------------------------------------------------------------
int Character::get_health()
{ return health;
}
//-----------------------------------------------------------------------------------------------
void Character::set_health(int _health)
{ health = _health;
}
//-----------------------------------------------------------------------------------------------
int Character::get_damage()
{ return damage;
}
//-----------------------------------------------------------------------------------------------
void Character::set_damage(int _damage)
{ damage = _damage;
}
//-----------------------------------------------------------------------------------------------
int Character::get_defence()
{ return defence;
}
//-----------------------------------------------------------------------------------------------
void Character::set_defence( int _defence)
{ defence = _defence;
}
//-----------------------------------------------------------------------------------------------