Created a base engine class and let it handle all creeps.
This commit is contained in:
21
include/Creeps/Creep.hpp
Normal file
21
include/Creeps/Creep.hpp
Normal 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
|
||||
Reference in New Issue
Block a user