TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
genericautobuild.h
1 /*
2  * Copyright (c) 2017-present, Facebook, Inc.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #pragma once
9 
10 #include "autobuild.h"
11 #include "cherrypi.h"
12 
13 namespace cherrypi {
14 
15 /**
16  * Loads and uses a build order from the blackboard.
17  */
19  public:
20  virtual ~GenericAutoBuildModule() = default;
21 
22  virtual std::shared_ptr<AutoBuildTask> createTask(
23  State* state,
24  int srcUpcId,
25  std::shared_ptr<UPCTuple> srcUpc) override;
26 
27  bool switchToBuildOrder(State* state, std::string name);
28 
29  private:
30  std::string activeBuild_;
31 };
32 
33 } // namespace cherrypi
Game state.
Definition: state.h:42
Loads and uses a build order from the blackboard.
Definition: genericautobuild.h:18
std::string name()
Definition: module.cpp:41
virtual ~GenericAutoBuildModule()=default
bool switchToBuildOrder(State *state, std::string name)
Definition: genericautobuild.cpp:37
virtual std::shared_ptr< AutoBuildTask > createTask(State *state, int srcUpcId, std::shared_ptr< UPCTuple > srcUpc) override
Definition: genericautobuild.cpp:23
Definition: autobuild.h:261
Main namespace for bot-related code.
Definition: areainfo.cpp:17