11 #include "src/modules/lambda.h" 34 std::vector<torchcraft::BW::TechType>
techs;
36 std::vector<SpawnPosition>
units;
39 for (
auto& upgrade : upgrades) {
40 if (upgrade.upgradeType ==
41 torchcraft::BW::UpgradeType::_from_integral_unchecked(upgradeType)) {
53 torchcraft::BW::TechType::_from_integral_unchecked(techType));
59 std::string map{
"test/maps/micro-empty2.scm"};
60 std::function<std::unique_ptr<Reward>()> reward = []() {
63 std::vector<FixedScenarioPlayer> players = {{}, {}};
67 players[player].techs.push_back(tech);
72 addUpgrade(
int player, torchcraft::BW::UpgradeType upgrade,
int level = 1) {
73 players[player].upgrades.push_back({upgrade, level});
77 std::vector<SpawnPosition>&
allies() {
78 return players[0].units;
81 return players[1].units;
87 std::vector<FixedScenario> scenarios = std::vector<FixedScenario>();
91 return scenarios.back();
Definition: scenariospecification.h:16
Definition: scenariospecification.h:33
FixedScenario & add(std::string name)
Definition: scenariospecification.h:89
FixedScenario & addUpgrade(int player, torchcraft::BW::UpgradeType upgrade, int level=1)
Definition: scenariospecification.h:72
std::vector< SpawnPosition > units
Definition: scenariospecification.h:36
int y
Definition: scenariospecification.h:20
tc::BW::UnitType type
Definition: scenariospecification.h:18
std::vector< SpawnPosition > & allies()
Definition: scenariospecification.h:77
double spreadY
Definition: scenariospecification.h:22
std::vector< torchcraft::BW::TechType > techs
Definition: scenariospecification.h:34
std::vector< ScenarioUpgradeLevel > upgrades
Definition: scenariospecification.h:35
int count
Definition: scenariospecification.h:17
int shields
Definition: scenariospecification.h:24
Definition: scenariospecification.h:85
Definition: scenariospecification.h:28
int x
Definition: scenariospecification.h:19
FixedScenario & addTech(int player, torchcraft::BW::TechType tech)
Definition: scenariospecification.h:66
torchcraft::BW::UpgradeType upgradeType
Definition: scenariospecification.h:29
std::string name
Definition: scenariospecification.h:86
int getUpgradeLevel(int upgradeType) const
Definition: scenariospecification.h:38
int energy
Definition: scenariospecification.h:25
std::unique_ptr< Reward > combatReward()
Definition: rewards.cpp:55
std::vector< SpawnPosition > & enemies()
Definition: scenariospecification.h:80
Definition: scenariospecification.h:57
std::string name
Definition: scenariospecification.h:58
std::vector< LambdaModule::StepFunctionState > stepFunctions
Definition: scenariospecification.h:64
Main namespace for bot-related code.
Definition: areainfo.cpp:17
double spreadX
Definition: scenariospecification.h:21
int health
Definition: scenariospecification.h:23
int hasTech(int techType) const
Definition: scenariospecification.h:48