24#include <entt/entt.hpp>
44 std::map<entt::entity, std::vector<MarketOrder>>
demands;
45 std::map<entt::entity, std::vector<MarketOrder>>
requests;
165 double newbalance = this->
balance * coefficent;
179 if ((_balance -
balance) < 0) {
Definition: resourceledger.h:210
void clear()
Definition: resourceledger.cpp:711
Definition: resourceledger.h:34
Represents commercial areas and other amenities that generate economic activity. They don't export go...
Definition: market.h:219
int size
Definition: market.h:222
entt::entity city
The city that it's based in.
Definition: market.h:221
Records the prices of goods and other things
Definition: market.h:142
Will be handled in the future, but for now is just a market
Definition: market.h:137
int population_change
Definition: market.h:229
int population_fufilled
Definition: market.h:228
int population_needed
Definition: market.h:227
entt::entity segment
Definition: market.h:230
An actor in a market that trades goods.
Definition: market.h:207
entt::entity market
Definition: market.h:208
entt::entity parent_market
Definition: market.h:101
ResourceLedger market_access
Definition: market.h:99
Market(size_t good_count)
Definition: market.h:52
ResourceLedger resource_fulfilled
Definition: market.h:85
double last_deficit
Definition: market.h:108
Market(Market &&) noexcept=default
Market(const Market &)=default
void AddParticipant(entt::entity participant)
Definition: market.h:113
void ResetLedgers()
Definition: market.h:89
ResourceLedger chronic_shortages
Definition: market.h:83
double last_trade_deficit
Definition: market.h:111
ResourceLedger demand
Definition: market.h:73
ResourceLedger production
Definition: market.h:86
ResourceLedger supply
Definition: market.h:74
ResourceLedger trade
Definition: market.h:84
ResourceLedger price
Definition: market.h:82
ResourceLedger volume
The amount of goods that changed hands. We can use this to calculate the GDP
Definition: market.h:81
ResourceLedger sd_ratio
Definition: market.h:75
double deficit
Definition: market.h:106
std::vector< entt::entity > connected_markets
Definition: market.h:97
double GDP
Definition: market.h:103
double trade_deficit
Definition: market.h:110
ResourceLedger consumption
Definition: market.h:87
std::set< entt::entity > participants
Definition: market.h:95
double price
Definition: market.h:36
entt::entity target
Definition: market.h:34
double amount
Definition: market.h:35
MarketOrder(entt::entity target, double amount, double price)
Definition: market.h:38
entt::entity owner
Definition: market.h:254
std::map< entt::entity, std::vector< MarketOrder > > requests
Definition: market.h:45
std::map< entt::entity, std::vector< MarketOrder > > demands
Definition: market.h:44
ResourceLedger supply_difference
Definition: market.h:48
ResourceLedger supplied_resources
Definition: market.h:47
PlanetaryMarket(size_t good_count)
Definition: market.h:43
Price of a good. This is temporary, because this is to determine initial prices for goods....
Definition: market.h:121
double price
Definition: market.h:122
Wallet & operator*=(const double coefficent)
Definition: market.h:164
double GetChange() const
Definition: market.h:188
double GetBalance() const
Definition: market.h:186
Wallet & operator-=(const double amount)
Definition: market.h:154
void Reset()
Definition: market.h:190
double balance
Definition: market.h:197
entt::entity currency
Definition: market.h:201
double GDP_change
Definition: market.h:200
double GetGDPChange()
Definition: market.h:194
Wallet & operator=(double _balance)
Definition: market.h:177
Wallet(entt::entity _currency, double _balance)
Definition: market.h:147
double change
Definition: market.h:198
Wallet & operator+=(const double amount)
Definition: market.h:149