-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharacter.h
More file actions
36 lines (29 loc) · 1.05 KB
/
Character.h
File metadata and controls
36 lines (29 loc) · 1.05 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
#ifndef CHARACTER_H
#define CHARACTER_H
#include <iostream>
#include <vector>
#include <cstdlib>
enum Upgrade { research1, research2, research3, research4, research5, research6 };
class Character {
private:
std::string name;
unsigned int limit; // both time perception as well as death counter
unsigned int age;
bool hasheir = false;
bool sex;
std::vector<Upgrade> upgrades;
std::vector<int> lifespan;
std::vector<Character> ancestry;
public:
Character(std::string name, int limit, int age, bool sex, std::vector<Upgrade> upgrades, std::vector<int> lifespan, std::vector<Character> ancestry): name(name), limit(limit),
age(age), sex(sex), upgrades(upgrades), lifespan(lifespan), ancestry(ancestry) {}
auto getLimit() { return limit; }
auto getAge() { return age; }
auto getLifespan() { return lifespan; }
auto getAncestry() { return ancestry; }
void setLimit(unsigned int l) { limit = l; }
void setAge(unsigned int a) { age = a; }
void setHeir(bool h) { hasheir = h; }
void setSex(bool s) { sex = s; }
};
#endif // CHARACTER_H