10 #include "blackboard.h" 11 #include "gameutils/scenariospecification.h" 12 #include "modules/lambda.h" 28 const std::vector<SpawnPosition>& spawns,
29 std::string
name = std::string());
33 const std::vector<SpawnPosition>& spawns,
34 std::string
name = std::string());
40 const std::vector<SpawnPosition>& spawns,
48 const std::vector<SpawnPosition>& spawns,
Game state.
Definition: state.h:42
virtual ~OnceModule()=default
virtual void step(State *state) override
Definition: once.cpp:24
static std::vector< tc::Client::Command > makeSpawnCommands(const std::vector< SpawnPosition > &spawns, State *state, int playerId)
Returns a list of commands which spawn units.
Definition: once.cpp:41
std::string name()
Definition: module.cpp:41
static std::shared_ptr< Module > makeWithEnemySpawns(const std::vector< SpawnPosition > &spawns, std::string name=std::string())
Similar function for enemy units.
Definition: once.cpp:81
static LambdaModule::StepFunctionState makeSpawnFn(const std::vector< SpawnPosition > &spawns, bool enemy)
Convenience function that returns a lambda to spawn units If enemy is true, then the units are spawne...
Definition: once.cpp:62
Lets you construct a lightweight module by providing your own step() as an std::function.
Definition: lambda.h:20
A simple utility module that runs a user-supplied function once per game.
Definition: once.h:20
std::function< void(State *, Module *)> StepFunctionStateModule
Definition: lambda.h:23
Main namespace for bot-related code.
Definition: areainfo.cpp:17
std::function< void(State *)> StepFunctionState
Definition: lambda.h:22
OnceModule(StepFunctionState func, std::string name=std::string())
Definition: once.cpp:14
static std::shared_ptr< Module > makeWithSpawns(const std::vector< SpawnPosition > &spawns, std::string name=std::string())
Spawns ally units.
Definition: once.cpp:74