-
Notifications
You must be signed in to change notification settings - Fork 0
/
Village.h
43 lines (37 loc) · 830 Bytes
/
Village.h
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
#ifndef VILLAGE_H
#define VILLAGE_H
#include <vector>
#include <algorithm>
#include <math.h>
#include "Person.h"
#include "Map.h"
#include "adn_exchange.grpc.pb.h"
using pathman::VillageP;
using pathman::PersonP;
using pathman::GeneP;
static bool pairCompare(const std::pair<Person*, int>& firstElem, const std::pair<Person*, int>& secondElem);
class Village
{
public:
Village(int id, int population, int seed);
~Village();
Map* getMap();
int iterate();
void generate();
Person* getPersonTest();
vector<Person*> getPeople();
VillageP getVillageP(int num);
void setVillageP(VillageP vil);
void reproduce();
void evaluate();
void kill();
int getBestNote();
void setPopulation(int pop);
int getPopulation();
private:
int id;
int population;
Map* map;
std::vector<std::pair<Person*, int> > people;
};
#endif