35 lines
814 B
C++
35 lines
814 B
C++
#ifndef DOUWCO_HIVEMIND_HARVESTER_HPP
|
|
#define DOUWCO_HIVEMIND_HARVESTER_HPP
|
|
|
|
#include "Creeps/CreepBase.hpp"
|
|
#include "Screeps/StructureContainer.hpp"
|
|
|
|
namespace DouwcoHivemind
|
|
{
|
|
class Worker : public CreepBase
|
|
{
|
|
private:
|
|
bool harvesting;
|
|
bool foundContainer;
|
|
|
|
public:
|
|
Worker(Screeps::Creep crp);
|
|
~Worker() override;
|
|
|
|
void loop() override;
|
|
|
|
protected:
|
|
virtual void depositEnergy(){}
|
|
|
|
private:
|
|
void getEnergy();
|
|
void harvestSource();
|
|
void collectEnergyFromContainers();
|
|
std::unique_ptr<Screeps::Source> getSourceTarget();
|
|
std::unique_ptr<Screeps::StructureContainer> getContainerTarget();
|
|
void searchSource();
|
|
void searchContainer();
|
|
};
|
|
}
|
|
|
|
#endif // DOUWCO_HIVEMIND_HARVESTER_HPP
|