Divided harveste into 3 jobs
This commit is contained in:
@@ -1,35 +1,28 @@
|
||||
#ifndef DOUWCO_HIVEMIND_HARVESTER_HPP
|
||||
#define DOUWCO_HIVEMIND_HARVESTER_HPP
|
||||
|
||||
|
||||
#include "Creeps/Creep.hpp"
|
||||
|
||||
namespace {
|
||||
class Creep;
|
||||
}
|
||||
|
||||
namespace DouwcoHivemind
|
||||
{
|
||||
class HarvesterRole : public Creep
|
||||
class Harvester : public Creep
|
||||
{
|
||||
private:
|
||||
bool harvesting;
|
||||
int taskCounter;
|
||||
|
||||
public:
|
||||
HarvesterRole(Screeps::Creep crp);
|
||||
~HarvesterRole() override;
|
||||
Harvester(Screeps::Creep crp);
|
||||
~Harvester() override;
|
||||
|
||||
void loop() override;
|
||||
|
||||
protected:
|
||||
virtual void depositEnergy(){}
|
||||
|
||||
private:
|
||||
void harvestSource();
|
||||
std::unique_ptr<Screeps::Source> getSourceTarget();
|
||||
void searchSource();
|
||||
|
||||
void depositEnergy();
|
||||
std::unique_ptr<Screeps::Structure> getDepositTarget();
|
||||
void searchDeposit();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user