-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimal.hpp
77 lines (47 loc) · 1.17 KB
/
animal.hpp
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
72
73
74
75
76
77
#ifndef ANIMAL_HPP_INCLUDED
#define ANIMAL_HPP_INCLUDED
#include <string>
#include "coord.hpp"
#include "ensemble.hpp"
using namespace std;
enum class Espece {renard, lapin, rien};
class Animal {
private:
int aId;
int age = 0;
int maxAge = 25;
Espece aType;
Coord aCoord;
//stats lapin
int MinFreeBirthLapin = 4;
int ProbReproLapin = 50;
//stats renard
int FoodInit = 5;
int FoodLapin = 5;
int FoodReprod = 8;
int MaxFood = 10;
int ProbBirthRenard = 5;
public:
//Constructors
Animal();
Animal(int id, Espece type, Coord coord);
//Methods
int getId() const;
Coord getCoord() const;
void setCoord(Coord c);
Espece getEspece() const;
string toString() const;
int getMinFreeBirthLapin() const;
int getProbReproLapin() const;
int getAge() const;
int getMaxAge() const;
int aged();
int getFoodInit() const;
void setFoodInit(int i);
int getFoodLapin() const;
int getFoodReprod() const;
int getMaxFood() const;
int getProbBirthRenard() const;
};
bool operator==(Animal a1, Animal a2);
#endif // ANIMAL_HPP_INCLUDED