-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonsters.cpp
More file actions
43 lines (38 loc) · 937 Bytes
/
monsters.cpp
File metadata and controls
43 lines (38 loc) · 937 Bytes
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
#include "monsters.h"
monsters::monsters() {
name = "monster";
strength = rand()%10 +1;
dexterity = rand()%10 +1;
endurance = rand()%10 +1;
intelligence = rand()%10 +1;
charisma = rand()%10 +1;
experience = rand()%10 +1;
}
void monsters::dispStats() {
cout<<"Statistics of: "<<name<<endl;
cout<<"Strength = "<<strength<<endl;
cout<<"Dexterity = "<<dexterity<<endl;
cout<<"Endurance = "<<endurance<<endl;
cout<<"Intelligence = "<<intelligence<<endl;
cout<<"Charisma = "<<charisma<<endl;
cout<<"experience = "<<experience<<endl;
cout << endl;
}
int monsters::get_s(){
return strength;
}
int monsters::get_d(){
return dexterity;
}
int monsters::get_e(){
return endurance;
}
int monsters::get_i(){
return intelligence;
}
int monsters::get_c(){
return charisma;
}
int monsters::get_exp(){
return experience;
}