2019-08-12 16:25:03 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "Career.h"
|
|
|
|
#include "Market.h"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class Population
|
|
|
|
{
|
|
|
|
public:
|
2019-08-12 16:52:11 +00:00
|
|
|
// Population group working to get production.
|
2019-08-12 16:25:03 +00:00
|
|
|
void work(void);
|
2019-08-12 16:52:11 +00:00
|
|
|
// Sell production to get money.
|
2019-08-12 16:25:03 +00:00
|
|
|
void sell(void);
|
2019-08-12 16:52:11 +00:00
|
|
|
// Give part of the money to nation.
|
2019-08-12 16:25:03 +00:00
|
|
|
void tax(void);
|
2019-08-12 16:52:11 +00:00
|
|
|
// Buy the production the population needed from the market.
|
2019-08-12 16:25:03 +00:00
|
|
|
void buy(void);
|
2019-08-12 16:52:11 +00:00
|
|
|
// Part of the population move to another land
|
2019-08-12 16:25:03 +00:00
|
|
|
void move(void);
|
2019-08-12 16:52:11 +00:00
|
|
|
//Part of the population changes the career
|
2019-08-12 16:25:03 +00:00
|
|
|
void increase(void);
|
|
|
|
private:
|
2019-08-12 16:52:11 +00:00
|
|
|
// Career of this population group.
|
2019-08-12 16:25:03 +00:00
|
|
|
shared_ptr<Career> career;
|
|
|
|
|
2019-08-12 16:52:11 +00:00
|
|
|
// The number of people of this population group.
|
2019-08-12 16:25:03 +00:00
|
|
|
float pop;
|
2019-08-12 16:52:11 +00:00
|
|
|
// Money rest from all recycle.
|
2019-08-12 16:25:03 +00:00
|
|
|
float money;
|
|
|
|
|
|
|
|
};
|