-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimal.cpp
More file actions
39 lines (33 loc) · 720 Bytes
/
Animal.cpp
File metadata and controls
39 lines (33 loc) · 720 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
#include <iostream>
#include "Resources.h"
#include "Animal.h"
#include <string>
Animal::Animal() {
animal_name_ = "";
}
Animal::Animal(string animal_name, int hp, Resources animal_drop) {
animal_name_ = animal_name;
hp_ = hp;
animal_drop_ = animal_drop;
}
//NAME
void Animal::setAnimalName(string animal_name) {
animal_name_ = animal_name;
}
string Animal::getAnimalName() const {
return animal_name_;
}
//HEALTH
void Animal::setAnimalHealth(int hp) {
hp_ = hp;
}
int Animal::getAnimalHealth() const {
return hp_;
}
//STUFF WE DONT NEED SET FUNCTIONS FOR
int Animal::getAnimalXp() const {
return xp_drop_;
}
Resources Animal::getAnimalDrop() const {
return animal_drop_;
}