24#include <entt/entt.hpp>
144 double GetPrice(
const entt::entity& good);
146 double GetSupply(
const entt::entity& good);
147 double GetDemand(
const entt::entity& good);
207 double newbalance = this->
balance * coefficent;
221 if ((_balance -
balance) < 0) {
Definition: resource.h:74
Represents commercial areas and other amenities that generate economic activity. They don't export go...
Definition: economy.h:268
entt::entity city
The city that it's based in.
Definition: economy.h:270
int size
Definition: economy.h:271
Records the prices of goods and other things
Definition: economy.h:184
Will be handled in the future, but for now is just a market
Definition: economy.h:179
Definition: economy.h:275
int population_needed
Definition: economy.h:276
entt::entity segment
Definition: economy.h:278
int population_fufilled
Definition: economy.h:277
Definition: economy.h:295
Definition: economy.h:262
An actor in a market that trades goods.
Definition: economy.h:249
entt::entity market
Definition: economy.h:250
An entity where the market is based, and the resources are traded.
Definition: economy.h:256
entt::entity market
Definition: economy.h:257
Definition: economy.h:125
void AddSupply(const ResourceLedger &stockpile)
Definition: economy.cpp:22
double GDP
Definition: economy.h:135
auto begin()
Definition: economy.h:153
double GetSupply(const entt::entity &good)
Definition: economy.cpp:56
std::vector< MarketInformation > history
Definition: economy.h:126
std::map< entt::entity, MarketElementInformation > market_information
Definition: economy.h:128
double GetSDRatio(const entt::entity &good)
Definition: economy.cpp:54
std::map< entt::entity, MarketElementInformation > last_market_information
Definition: economy.h:129
entt::basic_sparse_set< entt::entity > connected_markets
Definition: economy.h:133
MarketElementInformation & operator[](entt::entity ent)
Definition: economy.h:151
double GetPrice(const ResourceLedger &stockpile)
Definition: economy.cpp:46
std::set< entt::entity > participants
Definition: economy.h:131
double GetDemand(const entt::entity &good)
Definition: economy.cpp:58
void AddParticipant(entt::entity participant)
Definition: economy.h:149
void AddDemand(const ResourceLedger &stockpile)
Definition: economy.cpp:34
auto end()
Definition: economy.h:155
Definition: economy.h:299
entt::entity owner
Definition: economy.h:300
Definition: economy.h:121
std::vector< entt::entity > participants
Definition: economy.h:122
Price of a good. This is temporary, because this is to determine initial prices for goods....
Definition: economy.h:163
double price
Definition: economy.h:164
Definition: economy.h:303
Definition: economy.h:187
double GDP_change
Definition: economy.h:242
Wallet & operator=(double _balance)
Definition: economy.h:219
double GetChange() const
Definition: economy.h:230
double balance
Definition: economy.h:239
Wallet & operator-=(const double amount)
Definition: economy.h:196
void Reset()
Definition: economy.h:232
double change
Definition: economy.h:240
entt::entity currency
Definition: economy.h:243
double GetBalance() const
Definition: economy.h:228
Wallet & operator*=(const double coefficent)
Definition: economy.h:206
Wallet & operator+=(const double amount)
Definition: economy.h:191
double GetGDPChange()
Definition: economy.h:236
Wallet(entt::entity _currency, double _balance)
Definition: economy.h:189