TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
combat.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 "module.h"
11 #include "upc.h"
12 
13 namespace cherrypi {
14 
15 /**
16  * A combat module that controls squads of units.
17  *
18  * Used only for unit tests.
19  */
20 class CombatModule : public Module {
21  public:
22  virtual void step(State* s) override;
23 
24  protected:
25  bool
26  formNewSquad(State* s, std::shared_ptr<UPCTuple> sourceUpc, int sourceUpcId);
27  void updateTask(State* s, std::shared_ptr<Task> task);
28 };
29 
30 } // namespace cherrypi
Game state.
Definition: state.h:42
bool formNewSquad(State *s, std::shared_ptr< UPCTuple > sourceUpc, int sourceUpcId)
Definition: combat.cpp:229
Main namespace for bot-related code.
Definition: areainfo.cpp:17
A combat module that controls squads of units.
Definition: combat.h:20
void updateTask(State *s, std::shared_ptr< Task > task)
Definition: combat.cpp:283
virtual void step(State *s) override
Definition: combat.cpp:206
Interface for bot modules.
Definition: module.h:30