#include <microscenarioprovider.h>
Inherits cherrypi::ScenarioProvider.
Inherited by cherrypi::MicroScenarioProviderFixed, cherrypi::MicroScenarioProviderRandom, and cherrypi::MicroScenarioProviderSnapshot.
virtual cherrypi::MicroScenarioProvider::~MicroScenarioProvider |
( |
| ) |
|
|
virtualdefault |
void cherrypi::MicroScenarioProvider::createNewGame |
( |
| ) |
|
|
protected |
void cherrypi::MicroScenarioProvider::createNewPlayers |
( |
| ) |
|
|
protected |
void cherrypi::MicroScenarioProvider::endGame |
( |
| ) |
|
|
protected |
void cherrypi::MicroScenarioProvider::endScenario |
( |
| ) |
|
virtual FixedScenario cherrypi::MicroScenarioProvider::getFixedScenario |
( |
| ) |
|
|
protectedpure virtual |
std::unique_ptr< Reward > cherrypi::MicroScenarioProvider::getReward |
( |
| ) |
const |
void cherrypi::MicroScenarioProvider::killAllUnits |
( |
| ) |
|
|
protected |
bool cherrypi::MicroScenarioProvider::launchedWithReplay |
( |
| ) |
|
|
inlineprotected |
MicroPlayer& cherrypi::MicroScenarioProvider::microPlayer1 |
( |
| ) |
|
|
inlineprotected |
MicroPlayer& cherrypi::MicroScenarioProvider::microPlayer2 |
( |
| ) |
|
|
inlineprotected |
void cherrypi::MicroScenarioProvider::setMapPathPrefix |
( |
const std::string & |
prefix | ) |
|
It's possible to run this from not the rootdir of the repository, in which case you can set the mapPathPrefix to where the maps should be found.
This is just the path to your cherrypi directory
void cherrypi::MicroScenarioProvider::setReplay |
( |
std::string const & |
path | ) |
|
|
inline |
void cherrypi::MicroScenarioProvider::setupScenario |
( |
| ) |
|
|
protected |
std::pair< std::shared_ptr< BasePlayer >, std::shared_ptr< BasePlayer > > cherrypi::MicroScenarioProvider::startNewScenario |
( |
const std::function< void(BasePlayer *)> & |
setup1, |
|
|
const std::function< void(BasePlayer *)> & |
setup2 |
|
) |
| |
|
overridevirtual |
Spawns a scenario.
It takes as parameters the setup functions for both players (this should take care of adding modules), and returns the pointers to the created players
Implements cherrypi::ScenarioProvider.
std::shared_ptr<tc::Client> cherrypi::MicroScenarioProvider::client1_ |
|
protected |
std::shared_ptr<tc::Client> cherrypi::MicroScenarioProvider::client2_ |
|
protected |
std::string cherrypi::MicroScenarioProvider::mapPathPrefix_ |
|
protected |
std::string cherrypi::MicroScenarioProvider::replay_ |
|
protected |
int cherrypi::MicroScenarioProvider::resetCount_ = 0 |
|
protected |
int cherrypi::MicroScenarioProvider::scenarioCount_ = 0 |
|
protected |
int cherrypi::MicroScenarioProvider::unitsSeenTotal_ = 0 |
|
protected |
int cherrypi::MicroScenarioProvider::unitsThisGame_ = 0 |
|
protected |
int cherrypi::MicroScenarioProvider::unitsTotal_ = 0 |
|
protected |
The documentation for this class was generated from the following files: