Updated the supplier behavior to also use storage and implemented tower.

This commit is contained in:
2026-07-03 09:57:59 +02:00
parent 69816925ab
commit 078c824c47
9 changed files with 227 additions and 140 deletions

View 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

View File

@@ -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:

View File

@@ -19,7 +19,7 @@ public:
void loop();
protected:
bool placeContainers();
void placeContainers();
};
} // namespace DouwcoHivemind

View 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