24#include <entt/entt.hpp>
145 double GetPrice(
const entt::entity& good);
147 double GetSupply(
const entt::entity& good);
148 double GetDemand(
const entt::entity& good);
208 double newbalance = this->
balance * coefficent;
222 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:269
entt::entity city
The city that it's based in.
Definition: economy.h:271
int size
Definition: economy.h:272
Records the prices of goods and other things
Definition: economy.h:185
Will be handled in the future, but for now is just a market
Definition: economy.h:180
Definition: economy.h:276
int population_needed
Definition: economy.h:277
entt::entity segment
Definition: economy.h:279
int population_fufilled
Definition: economy.h:278
Definition: economy.h:296
Definition: economy.h:263
An actor in a market that trades goods.
Definition: economy.h:250
entt::entity market
Definition: economy.h:251
An entity where the market is based, and the resources are traded.
Definition: economy.h:257
entt::entity market
Definition: economy.h:258
Definition: economy.h:126
double GDP
Definition: economy.h:136
auto begin()
Definition: economy.h:154
std::vector< MarketInformation > history
Definition: economy.h:127
std::map< entt::entity, MarketElementInformation > market_information
Definition: economy.h:129
double GetPrice(const ResourceLedger &stockpile)
Definition: economy.cpp:45
void AddSupply(const ResourceLedger &stockpile)
Definition: economy.cpp:21
void AddDemand(const ResourceLedger &stockpile)
Definition: economy.cpp:33
std::map< entt::entity, MarketElementInformation > last_market_information
Definition: economy.h:130
entt::basic_sparse_set< entt::entity > connected_markets
Definition: economy.h:134
MarketElementInformation & operator[](entt::entity ent)
Definition: economy.h:152
double GetSDRatio(const entt::entity &good)
Definition: economy.cpp:53
std::set< entt::entity > participants
Definition: economy.h:132
void AddParticipant(entt::entity participant)
Definition: economy.h:150
double GetSupply(const entt::entity &good)
Definition: economy.cpp:55
auto end()
Definition: economy.h:156
double GetDemand(const entt::entity &good)
Definition: economy.cpp:57
Definition: economy.h:300
entt::entity owner
Definition: economy.h:301
Definition: economy.h:122
std::vector< entt::entity > participants
Definition: economy.h:123
Price of a good. This is temporary, because this is to determine initial prices for goods....
Definition: economy.h:164
double price
Definition: economy.h:165
Definition: economy.h:304
Definition: economy.h:188
double GDP_change
Definition: economy.h:243
Wallet & operator=(double _balance)
Definition: economy.h:220
double GetChange() const
Definition: economy.h:231
double balance
Definition: economy.h:240
Wallet & operator-=(const double amount)
Definition: economy.h:197
void Reset()
Definition: economy.h:233
double change
Definition: economy.h:241
entt::entity currency
Definition: economy.h:244
double GetBalance() const
Definition: economy.h:229
Wallet & operator*=(const double coefficent)
Definition: economy.h:207
Wallet & operator+=(const double amount)
Definition: economy.h:192
double GetGDPChange()
Definition: economy.h:237
Wallet(entt::entity _currency, double _balance)
Definition: economy.h:190