11 #include "microplayer.h" 12 #include "modules/once.h" 13 #include "scenarioprovider.h" 25 std::pair<std::shared_ptr<BasePlayer>, std::shared_ptr<BasePlayer>>
27 const std::function<
void(
BasePlayer*)>& setup1,
28 const std::function<
void(
BasePlayer*)>& setup2)
override;
31 std::unique_ptr<Reward>
getReward()
const;
61 return !replay_.empty();
MicroPlayer & microPlayer1()
Definition: microscenarioprovider.h:63
std::string replay_
Definition: microscenarioprovider.h:43
bool launchedWithReplay()
Definition: microscenarioprovider.h:60
void endGame()
Definition: microscenarioprovider.cpp:62
std::shared_ptr< BasePlayer > player2_
Definition: scenarioprovider.h:75
std::shared_ptr< tc::Client > client1_
Definition: microscenarioprovider.h:41
std::pair< std::shared_ptr< BasePlayer >, std::shared_ptr< BasePlayer > > startNewScenario(const std::function< void(BasePlayer *)> &setup1, const std::function< void(BasePlayer *)> &setup2) override
Spawns a scenario.
Definition: microscenarioprovider.cpp:317
MicroPlayer & microPlayer2()
Definition: microscenarioprovider.h:66
void killAllUnits()
Definition: microscenarioprovider.cpp:71
The main bot object.
Definition: baseplayer.h:28
std::string mapPathPrefix_
Definition: microscenarioprovider.h:44
int scenarioCount_
Definition: microscenarioprovider.h:51
int unitsTotal_
Definition: microscenarioprovider.h:49
virtual ~MicroScenarioProvider()=default
virtual FixedScenario getFixedScenario()=0
int resetCount_
Definition: microscenarioprovider.h:52
int unitsThisGame_
Definition: microscenarioprovider.h:48
Definition: microscenarioprovider.h:18
void setMapPathPrefix(const std::string &)
It's possible to run this from not the rootdir of the repository, in which case you can set the mapPa...
Definition: microscenarioprovider.cpp:30
int unitsSeenTotal_
Definition: microscenarioprovider.h:50
void endScenario()
Definition: microscenarioprovider.cpp:38
Definition: scenariospecification.h:57
Base class for providing scenarios.
Definition: scenarioprovider.h:23
void createNewPlayers()
Definition: microscenarioprovider.cpp:110
Main namespace for bot-related code.
Definition: areainfo.cpp:17
The main bot object for training scenarios.
Definition: microplayer.h:28
std::shared_ptr< tc::Client > client2_
Definition: microscenarioprovider.h:42
std::unique_ptr< Reward > getReward() const
Definition: microscenarioprovider.cpp:34
void createNewGame()
Definition: microscenarioprovider.cpp:126
void setReplay(std::string const &path)
Definition: microscenarioprovider.h:21
void setupScenario()
Definition: microscenarioprovider.cpp:142
std::shared_ptr< BasePlayer > player1_
Definition: scenarioprovider.h:74
FixedScenario scenarioNow_
Definition: microscenarioprovider.h:46