24#include <entt/entt.hpp>
104 std::map<entt::entity, std::vector<MarketOrder>>
demands;
105 std::map<entt::entity, std::vector<MarketOrder>>
requests;
186 double newbalance = this->
balance * coefficent;
200 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:240
int size
Definition: market.h:243
entt::entity city
The city that it's based in.
Definition: market.h:242
Records the prices of goods and other things
Definition: market.h:163
Will be handled in the future, but for now is just a market
Definition: market.h:158
int population_change
Definition: market.h:250
int population_fufilled
Definition: market.h:249
int population_needed
Definition: market.h:248
entt::entity segment
Definition: market.h:251
An actor in a market that trades goods.
Definition: market.h:228
entt::entity market
Definition: market.h:229
entt::entity parent_market
Definition: market.h:122
entt::basic_sparse_set< entt::entity > connected_markets
Definition: market.h:118
Market(size_t good_count)
Definition: market.h:112
double last_deficit
Definition: market.h:129
ResourceMap market_access
Definition: market.h:120
void AddParticipant(entt::entity participant)
Definition: market.h:134
double last_trade_deficit
Definition: market.h:132
double deficit
Definition: market.h:127
double GDP
Definition: market.h:124
double trade_deficit
Definition: market.h:131
std::set< entt::entity > participants
Definition: market.h:116
std::vector< MarketInformation > history
Definition: market.h:114
double price
Definition: market.h:96
entt::entity target
Definition: market.h:94
double amount
Definition: market.h:95
MarketOrder(entt::entity target, double amount, double price)
Definition: market.h:98
entt::entity owner
Definition: market.h:275
std::map< entt::entity, std::vector< MarketOrder > > requests
Definition: market.h:105
std::map< entt::entity, std::vector< MarketOrder > > demands
Definition: market.h:104
ResourceLedger supply_difference
Definition: market.h:108
ResourceLedger supplied_resources
Definition: market.h:107
PlanetaryMarket(size_t good_count)
Definition: market.h:103
Price of a good. This is temporary, because this is to determine initial prices for goods....
Definition: market.h:142
double price
Definition: market.h:143
Wallet & operator*=(const double coefficent)
Definition: market.h:185
double GetChange() const
Definition: market.h:209
double GetBalance() const
Definition: market.h:207
Wallet & operator-=(const double amount)
Definition: market.h:175
void Reset()
Definition: market.h:211
double balance
Definition: market.h:218
entt::entity currency
Definition: market.h:222
double GDP_change
Definition: market.h:221
double GetGDPChange()
Definition: market.h:215
Wallet & operator=(double _balance)
Definition: market.h:198
Wallet(entt::entity _currency, double _balance)
Definition: market.h:168
double change
Definition: market.h:219
Wallet & operator+=(const double amount)
Definition: market.h:170