Improved walking system.

This commit is contained in:
douwe
2025-08-24 12:08:22 +02:00
parent 98b123ee0d
commit cc0de10471
26 changed files with 858 additions and 154 deletions

View File

@@ -1,10 +1,13 @@
#ifndef DOUWCO_HIVEMIND_HARVESTER_HPP
#define DOUWCO_HIVEMIND_HARVESTER_HPP
#include <Screeps/Creep.hpp>
#include "Creeps/Creep.hpp"
namespace {
class Creep;
}
namespace DouwcoHivemind
{
class HarvesterRole : public Creep
@@ -14,17 +17,8 @@ namespace DouwcoHivemind
int taskCounter;
public:
HarvesterRole(Screeps::Creep crp) : Creep(crp)
{
harvesting = memory.contains("harvesting") ? static_cast<bool>(memory["harvesting"]) : false;
taskCounter = memory.contains("taskCounter") ? static_cast<int>(memory["taskCounter"]) : 0;
}
~HarvesterRole() override
{
memory["harvesting"] = harvesting;
memory["taskCounter"] = taskCounter;
}
HarvesterRole(Screeps::Creep crp);
~HarvesterRole() override;
void loop() override;