Updated the supplier behavior to also use storage and implemented tower.
This commit is contained in:
9
douwco_hivemind/include/Constants.hpp
Normal file
9
douwco_hivemind/include/Constants.hpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef DOUWCO_HIVEMIND_CONSTANTS_HPP
|
||||
#define DOUWCO_HIVEMIND_CONSTANTS_HPP
|
||||
|
||||
namespace DouwcoHivemind
|
||||
{
|
||||
enum CreepRole { UNEMPLOYED, SUPPLIER, UPGRADER, BUILDER, MAINTAINER, MINER };
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_CONSTANTS_HPP
|
||||
@@ -2,6 +2,7 @@
|
||||
#define DOUWCO_HIVEMIND_CREEPBASE_HPP
|
||||
|
||||
#include <Screeps/Creep.hpp>
|
||||
#include "Constants.hpp"
|
||||
|
||||
namespace Screeps {
|
||||
class RoomPosition;
|
||||
@@ -10,7 +11,6 @@ class PathStep;
|
||||
} // namespace Screeps
|
||||
|
||||
namespace DouwcoHivemind {
|
||||
enum CreepRole { UNEMPLOYED, SUPPLIER, UPGRADER, BUILDER, MAINTAINER, MINER };
|
||||
|
||||
class CreepBase {
|
||||
public:
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
void loop();
|
||||
|
||||
protected:
|
||||
bool placeContainers();
|
||||
void placeContainers();
|
||||
};
|
||||
} // namespace DouwcoHivemind
|
||||
|
||||
|
||||
24
douwco_hivemind/include/Structures/Tower.hpp
Normal file
24
douwco_hivemind/include/Structures/Tower.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef DOUWCO_HIVEMIND_TOWER_HPP
|
||||
#define DOUWCO_HIVEMIND_TOWER_HPP
|
||||
|
||||
#include <Screeps/StructureTower.hpp>
|
||||
|
||||
#include "Structures/StructureBase.hpp"
|
||||
|
||||
namespace DouwcoHivemind
|
||||
{
|
||||
class Tower : public StructureBase
|
||||
{
|
||||
private:
|
||||
Screeps::StructureTower tower;
|
||||
|
||||
public:
|
||||
Tower(Screeps::StructureTower twr) : tower(twr),
|
||||
StructureBase() {}
|
||||
~Tower() {}
|
||||
|
||||
void loop() override;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_TOWER_HPP
|
||||
Reference in New Issue
Block a user