Created a base engine class and let it handle all creeps.

This commit is contained in:
douwe
2025-08-21 14:13:32 +02:00
parent c9ce09ba1a
commit 1e9e696b1e
16 changed files with 221 additions and 91 deletions

21
include/Creeps/Creep.hpp Normal file
View File

@@ -0,0 +1,21 @@
#ifndef DOUWCO_HIVEMIND_CREEP_HPP
#define DOUWCO_HIVEMIND_CREEP_HPP
#include <Screeps/Creep.hpp>
namespace DouwcoHivemind
{
class Creep
{
protected:
Screeps::Creep creep;
JSON memory;
public:
Creep(Screeps::Creep crp) : creep(crp), memory(crp.memory()){}
~Creep(){ creep.setMemory(memory); }
virtual void loop(){}
};
}
#endif // DOUWCO_HIVEMIND_CREEP_HPP