19 #ifndef OPENXCOM_ALIENSTRATEGY_H
20 #define OPENXCOM_ALIENSTRATEGY_H
22 #include <yaml-cpp/yaml.h>
23 #include "WeightedOptions.h"
42 void load(
const Ruleset *rules,
const YAML::Node& node);
44 YAML::Node
save()
const;
50 bool removeMission(
const std::string ®ion,
const std::string &mission);
55 std::map<std::string, WeightedOptions*> _regionMissions;
YAML::Node save() const
Saves the data to YAML.
Definition: AlienStrategy.cpp:100
void load(const Ruleset *rules, const YAML::Node &node)
Loads the data from YAML.
Definition: AlienStrategy.cpp:75
Stores the information about alien strategy.
Definition: AlienStrategy.h:32
~AlienStrategy()
Free resources used by the AlienStrategy.
Definition: AlienStrategy.cpp:44
const std::string chooseRandomRegion(const Ruleset *rules)
Choose a random region for a regular mission.
Definition: AlienStrategy.cpp:119
Set of rules and stats for a game.
Definition: Ruleset.h:69
bool removeMission(const std::string ®ion, const std::string &mission)
Remove a region and mission from the list of posibilities.
Definition: AlienStrategy.cpp:149
Holds pairs of relative weights and IDs.
Definition: WeightedOptions.h:34
AlienStrategy()
Create an AlienStrategy with no data.
Definition: AlienStrategy.cpp:36
const std::string chooseRandomMission(const std::string ®ion) const
Choose a random mission for a region.
Definition: AlienStrategy.cpp:136
void init(const Ruleset *rules)
Initialize values according to the rules.
Definition: AlienStrategy.cpp:57