blob: b19cf36ac356cb0ad03fccbdf9f7d179977849f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include "openvic-simulation/economy/GoodDefinition.hpp"
#include "openvic-simulation/economy/trading/BuyResult.hpp"
#include "openvic-simulation/types/fixed_point/FixedPoint.hpp"
#include "openvic-simulation/utility/Getters.hpp"
namespace OpenVic {
struct BuyUpToOrder {
private:
GoodDefinition const* const PROPERTY(good);
const fixed_point_t PROPERTY(max_quantity);
const fixed_point_t PROPERTY(money_to_spend);
const std::function<void(const BuyResult)> PROPERTY(after_trade);
public:
BuyUpToOrder(
GoodDefinition const& new_good,
const fixed_point_t new_max_quantity,
const fixed_point_t new_money_to_spend,
const std::function<void(const BuyResult)> new_after_trade
);
};
}
|