-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenemy.cc
51 lines (39 loc) · 818 Bytes
/
enemy.cc
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
#include "enemy.h"
int Enemy::getHP() const{
return HP;
}
int Enemy::getAtk() const{
return Atk;
}
int Enemy::getDef() const {
return Def;
}
int Enemy::getGold() const {
return Gold;
}
bool Enemy::getCompass() {
return compass;
}
std::string Enemy::getName() const {
return Name;
}
bool Enemy::getMove() const {
return move;
}
void Enemy::setMove(bool move) {
this->move = move;
}
void Enemy::setHP(int HP) {
if (HP > 0) {
this->HP = HP;
}
else {
this->HP = 0;
}
}
void Enemy::setCompass(bool compass) {
this->compass = compass;
}
Enemy::Enemy(int HP, int Atk, int Def, std::string Name, int Gold, bool move, bool compass) : HP{HP}, Atk{Atk}, Def{Def},
Name{ Name }, Gold{ Gold }, move{ move }, compass{ compass } {}
Enemy::~Enemy() {};