Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Functions
cqsp::common::systems::economy Namespace Reference

Functions

entt::entity CreateMarket (Universe &universe)
 Creates a market two instance. More...
 
void CreateMarket (Universe &universe, entt::entity market)
 
bool PurchaseGood (Universe &universe, entt::entity agent, const components::ResourceLedger &purchase)
 Note: This will only buy the maximum resources that are in the market. If there aren't enough resources on the market, then we buy all the remaining resources on the market. You'll have to calculate how much you want later on More...
 
bool SellGood (Universe &universe, entt::entity agent, const components::ResourceLedger &selling)
 
void AddParticipant (cqsp::common::Universe &universe, entt::entity market, entt::entity entity)
 
double GetCost (cqsp::common::Universe &universe, entt::entity market, const components::ResourceLedger &ledger)
 

Function Documentation

◆ AddParticipant()

void cqsp::common::systems::economy::AddParticipant ( cqsp::common::Universe universe,
entt::entity  market,
entt::entity  entity 
)

◆ CreateMarket() [1/2]

entt::entity cqsp::common::systems::economy::CreateMarket ( Universe universe)

Creates a market two instance.

◆ CreateMarket() [2/2]

void cqsp::common::systems::economy::CreateMarket ( Universe universe,
entt::entity  market 
)

◆ GetCost()

double cqsp::common::systems::economy::GetCost ( cqsp::common::Universe universe,
entt::entity  market,
const components::ResourceLedger ledger 
)

◆ PurchaseGood()

bool cqsp::common::systems::economy::PurchaseGood ( Universe universe,
entt::entity  agent,
const components::ResourceLedger purchase 
)

Note: This will only buy the maximum resources that are in the market. If there aren't enough resources on the market, then we buy all the remaining resources on the market. You'll have to calculate how much you want later on

Parameters
universe
agent
purchase
Returns

◆ SellGood()

bool cqsp::common::systems::economy::SellGood ( Universe universe,
entt::entity  agent,
const components::ResourceLedger selling 
)