Improved miners and workers to work together.

This commit is contained in:
2026-07-01 00:24:25 +02:00
parent ceed83358b
commit 1e9b14f21c
6 changed files with 98 additions and 42 deletions

View File

@@ -2,6 +2,7 @@
#define DOUWCO_HIVEMIND_HARVESTER_HPP
#include "Creeps/CreepBase.hpp"
#include "Screeps/StructureContainer.hpp"
namespace DouwcoHivemind
{
@@ -9,6 +10,7 @@ namespace DouwcoHivemind
{
private:
bool harvesting;
bool foundContainer;
public:
Worker(Screeps::Creep crp);
@@ -22,8 +24,11 @@ namespace DouwcoHivemind
private:
void getEnergy();
void harvestSource();
void collectEnergyFromContainers();
std::unique_ptr<Screeps::Source> getSourceTarget();
std::unique_ptr<Screeps::StructureContainer> getContainerTarget();
void searchSource();
void searchContainer();
};
}