-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHumanoids.cpp
More file actions
71 lines (61 loc) · 1.53 KB
/
Humanoids.cpp
File metadata and controls
71 lines (61 loc) · 1.53 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
69
70
71
#include "Humanoids.h"
//Vampire constructor
Vampire::Vampire(std::string name)
:Human(name, "VAMPIRE", "BLOODSUCKING", "VAMPIRES"){
}
//Makes default speech for vampire
std::string Vampire::DefaultSpeech(){
switch (rand()%3){
case 0:
return "Vlad the Impaler was too gentle.";
break;
case 1:
return "The sun is the destroyer of life, not the creator.";
break;
case 2:
return "You mortals suffer the plight of fools.";
break;
}
}
//Vampire destructor
Vampire::~Vampire(){}
//Nobbs constructor
Nobbs::Nobbs(std::string name)
:Human(name, "NOBBS", "UNKNOWN", "NOBBS"){
}
//Makes default speech for Nobbs
std::string Nobbs::DefaultSpeech(){
switch (rand()%3){
case 0:
return "What is a Nobb?";
break;
case 1:
return "Excuse me while I disappear.";
break;
case 2:
return "What is the question to my answer?";
break;
}
}
//Nobbs destructor
Nobbs::~Nobbs(){}
//Zombie constructor
Zombie::Zombie(std::string name)
:Human(name, "ZOMBIE", "UNDEAD", "ZOMBIES"){
}
//Makes zombie default speech
std::string Zombie::DefaultSpeech(){
switch (rand()%3){
case 0:
return "*Tearing*";
break;
case 1:
return "*Crumbling to dust*";
break;
case 2:
return "*Awkward silence*";
break;
}
}
//Zombie destructor
Zombie::~Zombie(){}