36 lines
703 B
C++
36 lines
703 B
C++
#ifndef DOUWCO_HIVEMIND_HARVESTER_HPP
|
|
#define DOUWCO_HIVEMIND_HARVESTER_HPP
|
|
|
|
|
|
#include "Creeps/Creep.hpp"
|
|
|
|
namespace {
|
|
class Creep;
|
|
}
|
|
|
|
namespace DouwcoHivemind
|
|
{
|
|
class HarvesterRole : public Creep
|
|
{
|
|
private:
|
|
bool harvesting;
|
|
int taskCounter;
|
|
|
|
public:
|
|
HarvesterRole(Screeps::Creep crp);
|
|
~HarvesterRole() override;
|
|
|
|
void loop() override;
|
|
|
|
private:
|
|
void harvestSource();
|
|
std::unique_ptr<Screeps::Source> getSourceTarget();
|
|
void searchSource();
|
|
|
|
void depositEnergy();
|
|
std::unique_ptr<Screeps::Structure> getDepositTarget();
|
|
void searchDeposit();
|
|
};
|
|
}
|
|
|
|
#endif // DOUWCO_HIVEMIND_HARVESTER_HPP
|