TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cherrypi::StrategyModule Class Reference

#include <strategy.h>

Inherits cherrypi::Module.

Public Types

enum  Duty {
  None = 0, BuildOrder = 1 << 0, Scouting = 1 << 1, Harassment = 1 << 2,
  All = 0xFFFF
}
 

Public Member Functions

 StrategyModule (Duty duties=Duty::All)
 
virtual ~StrategyModule ()=default
 
virtual void step (State *state) override
 
virtual void onGameStart (State *s) override
 
virtual void onGameEnd (State *s) override
 
- Public Member Functions inherited from cherrypi::Module
virtual ~Module ()=default
 
virtual void setPlayer (BasePlayer *p)
 
void setName (std::string name)
 
std::string name ()
 

Protected Member Functions

virtual void stepBuildOrder (State *state)
 Chooses the build order. More...
 
virtual void stepScouting (State *state)
 
virtual void stepHarassment (State *state)
 
std::shared_ptr< ProxyTaskgetProxyTaskWithCommand (State *state, Command command)
 
std::string getOpeningBuildOrder (State *s)
 
void spawnBuildOrderTask (State *state, UpcId originUpcId, std::string const &buildorder)
 
- Protected Member Functions inherited from cherrypi::Module
 Module ()
 

Protected Attributes

std::string currentBuildOrder_
 
- Protected Attributes inherited from cherrypi::Module
BasePlayerplayer_
 
std::string name_
 

Additional Inherited Members

- Static Public Member Functions inherited from cherrypi::Module
template<typename T , typename... Args>
static std::shared_ptr< T > make (Args &&...args)
 
static std::shared_ptr< Modulemake (std::string const &typeName)
 
static std::string makeName (std::type_index const &type)
 

Member Enumeration Documentation

Enumerator
None 
BuildOrder 
Scouting 
Harassment 
All 

Constructor & Destructor Documentation

cherrypi::StrategyModule::StrategyModule ( Duty  duties = Duty::All)
virtual cherrypi::StrategyModule::~StrategyModule ( )
virtualdefault

Member Function Documentation

std::string cherrypi::StrategyModule::getOpeningBuildOrder ( State s)
protected
std::shared_ptr< ProxyTask > cherrypi::StrategyModule::getProxyTaskWithCommand ( State state,
Command  command 
)
protected
void cherrypi::StrategyModule::onGameEnd ( State s)
overridevirtual

Reimplemented from cherrypi::Module.

void cherrypi::StrategyModule::onGameStart ( State s)
overridevirtual

Reimplemented from cherrypi::Module.

void cherrypi::StrategyModule::spawnBuildOrderTask ( State state,
UpcId  originUpcId,
std::string const &  buildorder 
)
protected
void cherrypi::StrategyModule::step ( State state)
overridevirtual

Reimplemented from cherrypi::Module.

void cherrypi::StrategyModule::stepBuildOrder ( State state)
protectedvirtual

Chooses the build order.

void cherrypi::StrategyModule::stepHarassment ( State state)
protectedvirtual
void cherrypi::StrategyModule::stepScouting ( State state)
protectedvirtual

Member Data Documentation

std::string cherrypi::StrategyModule::currentBuildOrder_
protected

The documentation for this class was generated from the following files: